Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
Issues are kind of orthogonal to code (i.e. they transcend version snapshots), so it's useful to have a separate system for them. As such, git has no built-in system for issue tracking. Since BitBucket and GitHub both have APIs for issues, there are easy ways to migrate the issues across. Searching for "migrate bitbucket issues to github" produces at least one script to do exactly that.
Is possible to store the project issues in its git repository? I know that git doesn't support this feature and the issues are stored in the provider site (eg. Bitbucket, Github). I would like to develop a project as a free private repository on Bitbucket, and when it is finished to make it open source moving it to Github. The problem is that the issues reported in the Bitbucket repo will not be available in the Github repo, because they are stored in the Bitbucket databases. Which is the best solution?
Is possible to store repository issues in the git repository?
You should differentiate between docker daemon and docker CLI. First one is a service, which actually performs all work - builds and runs containers. The second one is an executable, used tosend commands to daemon.Executable (docker CLI) is lightweight and uses/var/run/docker.sockto access daemon (by default, there are different transports actually).When you start your container with-v /var/run/docker.sock:/var/run/docker.sockyou actuallyshare your host'sdocker daemon to docker CLI in container. Thus, you still need to install docker CLI inside container to make use of Docker, but you dont need to setup daemon inside (which is pretty complicated and requires priviledged mode).ConclusionInstall docker CLI inside container, share socket and enjoy. But upon using host's docker daemon, you will probably be confused with bind mounting volumes because daemon doesn't see the container's internal file system.ShareFollowansweredMar 23, 2019 at 17:28grapesgrapes8,40311 gold badge2020 silver badges3131 bronze badges12I've listed the instructions to add the Docker CLI and bind mount the docker.sock herestackoverflow.com/a/55317547/1556338–BernardMar 23, 2019 at 19:41Add a comment|
I'm trying to use docker command inside container. i use this command to mount /var/run/docker.sock and run containerdocker run -d --name gitlab-runner --restart always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ gitlab/gitlab-runner:latestbut when i try to use docker inside container(gitlab-runner) i get an errordocker: not foundhost:srw-rw---- 1 root docker 0 Mar 23 15:13 docker.sockcontainer:0 srw-rw---- 1 root gitlab-runner 0 Mar 23 15:13 docker.sockthis worked fine, before i removed old container and created new one, and now i'm unable to run docker inside container. Please help.
docker: not found after mounting /var/run/docker.sock
Just look for*.gzfiles and delete them.find /var/log/tomcat8/ -name '*.gz' -mindepth 1 -mtime +1 -deleteBefore deleting, just list the files to make sure you are deleting the correct ones.find /var/log/tomcat8/ -name '*.gz' -mindepth 1 -mtime +1 -print
I was setting up a cron job where I wanted to delete log files older than 1 day. The command to do this is as below. I am doing this on a AWS Linux EC2 instance.find /var/log/tomcat8/ -mindepth 1 -mtime +1 -deleteBut what I want to achieve is I want to exclude.logfiles from getting deleted and want to just delete the files with.gzextension. Can any body let me know how I achieve that exclusion in find command.
Deleting old files using cron job in Linux
You'll have to use an url helper. background-image: url(image-path("logo.png")); or asset-url("logo.png", image) Rails automatically adds the hash in production.
I'm trying to access a file logo.png from my rails app. During the deploy process everything in /app/assets gets compiled and placed into /public/assets. For example my file which had been named logo.png looks like this: /public/assets/logo-e66eddecdb08ac2b7fe349da2a065d87.png When I try to access that full filename nginx successfully serves it up directly because of these lines in my /etc/sites-enabled/myapp: try_files $uri/index.html $uri @unicorn; root /home/deployer/apps/myapp/current/public So I can browse to myserverhost.com/assets/logo-e66eddecdb08ac2b7fe349da2a065d87.png and it loads fine. However of course in my app I have that file referenced simply as "logo.png" and when I load my home page I'm getting a 404 not found on the logo.png. How is nginx supposed to know that the filename has been mashed up with a hash at the end? EDIT: I reference the logo file like this in my scss file: #sidebar .logo-div { border-bottom: 2px solid#ddd; width:100%; height:80px; text-align:center; background-image:url('logo.png'); background-position:center; background-repeat:no-repeat; margin-bottom:20px; }
Rails asset pipeline and serving static files from nginx
Have you got a reproduction scenario?It's hard to say specifically what's going on with this, but note that Google Pay needs to be running in asecurecontext. i.e. validhttps, or with a valid browser exception likelocalhost.If you're working with a web framework, consider using the framework specific libraries for React, Angular or Web Components:https://github.com/google-pay/google-pay-button#readmeHere are some samples:https://stackblitz.com/edit/google-pay-reacthttps://stackblitz.com/edit/google-pay-angularhttps://stackblitz.com/edit/google-pay-custom-elementhttps://stackblitz.com/edit/google-pay-vuehttps://stackblitz.com/edit/google-pay-svelteEDIT: Additional context for working with SSL locallyHave a look at the following resource for working with secure contexts locally:https://web.dev/when-to-use-local-https/Some options to consider:Add aninsecure overridefor your local environment in your browser to treat it as secure. For Google Chrome, use:chrome://flags/#unsafely-treat-insecure-origin-as-secure.ngrokwhich will expose your local environment as apubliclyaccessiblehttpsendpoint. Thepublicendpoint may be considered either a non starter for you, or a feature depending on your requirements/constraints.local-ssl-proxywhich will proxy your application via a local SSL proxy using a self signed certificate. This is more onerous to set up but doesn't expose your local environment to the internet.
I want to integrategoogle payusing a gateway.I created thegoogle payaccount with theurlinformation I work inlocalWhile trying to import pay js, I get anerroras in ss, I haven't figured out why yet.The main reason I got this error is because I don't have a localssl certificate.I am using Spring framework and ubuntu as operating system. How can I defineSSL Certificationin my local?
Google Pay Integration Pay.js SSL Sertificate Error
Using an Automator application wrapper also works. Create the wrapper (run shell script), run in manually and grant it permission. Then the cron job can call the Automator app.
In OSX Mojave, access to the camera is controlled by pop-up dialogs and the new System Preferences>>Security & Privacy>>Privacy>>camera panel, where apps can be granted (or denied) access to the camera.I can grant "iterm2" access to the camera, which lets me run imagesnap from the commandline.I use a cron job to capture a photograph of the cat bed every 60 seconds. This now fails, since upgrade to Mojave, because it does not have permission to access the camera. Is there any way I can give my cron job access? I don't get a pop-up dialog for a cron job.
How do I grant a cron job webcam access in Mac OSX Mojave?
1 One way to do it is to store the sorting permutation of all tails of your text (text from certain point up until end). Then to find a substring you binary search for it in those cyclic shifts. Memory used using 32 bit ints would be 4 bytes per original character. p.s: I heard there is a way to accomplish a similar thing by storing the Burrows-Wheeler transform of the text (1 charecter per original charecter) but I can't seem to find any references to it.. Share Improve this answer Follow answered Jun 18, 2009 at 0:01 yairchuyairchu 24.1k77 gold badges7070 silver badges111111 bronze badges 2 Permutations! THAT'S a great idea! I'll just split each "word" into characters, sort them, and store the result as map key (such result would be the "initial permutation", or "permutation 0"). Querying would be done similar! – ivan_ivanovich_ivanoff Jun 18, 2009 at 15:50 Oh, sorry, my proposal with permutations would not allow to search of partial character sequences :( – ivan_ivanovich_ivanoff Jun 18, 2009 at 17:57 Add a comment  | 
I wonder, how are systems for fulltext search implemented, to be able to query millions of entries very fast? Please note: I'm not talking about systems which tokenize the content by separating it at whitespaces, but about system which are able to query even parts from the middle of tokens (which is a real challange). Background information I experimented with a home-made string cacher (using Java) which is able to search for strings, given a substring as query. The substring is not required to be at the begin of potential retrieved strings. It works on a huge array of strings. Caching is done using a TreeMap<Character,TreeSet<String>>. Adding entry For each unique character in the to-be-added string: Get the set for that character, and add the string to it. Example: "test" is first split in "t", "e", "s". Then, we retrieve the sets for those three keys, and add "test" to each of the set. Querieng Querying is done by splitting the query into unique characters, retrieve for every character a Set<String>, build an intersection of all sets, and finally search the intersection using contains() to ensure correct order of query characters. Benchmark On a 3GHz machine, I added 2'000'000 strings with average length of 10, random content. Done 100 queries. It took: Min: 0.4sec, Average: 0.5sec, Max: 0.6sec. 1.5GB of memory were wasted.
How do fulltext indexers (or caches) work?
You can stuff the actually cached values in the Rails cache (use memcached if you require that it be distributed). The tough bit is cache expiry, but cache expiry is uncommon, right? In that case, we can just loop over each of the parent objects in turn and zap its cache, too. I added some ActiveRecord magic to your class to make getting the parent objects simplicity itself -- and you don't even need to touch your database. Remember to call Part.sweep_complicated_cache(some_part) as appropriate in your code -- you can put this in callbacks, etc, but I can't add it for you because I don't understand when complicated_calculation is changing. class Part < ActiveRecord::Base has_many :sub_parts, :class_name => "Part" belongs_to :parent_part, :class_name => "Part", :foreign_key => :part_id @@MAX_PART_NESTING = 25 #pick any sanity-saving value def complicated_calculation (...) if cache.contains? [id, :complicated_calculation] cache[ [id, :complicated_calculation] ] else cache[ [id, :complicated_calculation] ] = complicated_calculation_helper (...) end end def complicated_calculation_helper #your implementation goes here end def Part.sweep_complicated_cache(start_part) level = 1 # keep track to prevent infinite loop in event there is a cycle in parts current_part = self cache[ [current_part.id, :complicated_calculation] ].delete while ( (level <= 1 < @@MAX_PART_NESTING) && (current_part.parent_part)) { current_part = current_part.parent_part) cache[ [current_part.id, :complicated_calculation] ].delete end end end
I have a tree of active record objects, something like: class Part < ActiveRecord::Base has_many :sub_parts, :class_name => "Part" def complicated_calculation if sub_parts.size > 0 return self.sub_parts.inject(0){ |sum, current| sum + current.complicated_calculation } else sleep(1) return rand(10000) end end end It is too costly to recalculate the complicated_calculation each time. So, I need a way to cache the value. However, if any part is changed, it needs to invalidate its cache and the cache of its parent, and grandparent, etc. As a rough draft, I created a column to hold the cached calculation in the "parts" table, but this smells a little rotten. It seems like there should be a cleaner way to cache the calculated values without stuffing them along side the "real" columns.
How can I cache a calculated column in rails?
As long as the parameters in question do not have theNoEchoproperty explicitly set totrue(it defaults tofalse), then you can retrieve the parameter values using thedescribe-stackscall from any of the various tools (e.g. AWS API, CLI, or SDK of your choice). IfNoEchois set totrue, you won't be able to retrieve those parameter values.To run the command, you will need to either run it from an instance that's running with an IAM role / instance profile which has the correct permissions to calldescribe-stacks, or the tool has been configured with AWS security credentials (i.e.Access Key IdandSecret Access Key) that have permission.AWS CLI examples:aws cloudformation describe-stacks --region <region> --stack-name <stack-name>By default, you'll notice the parameters are embeded in a JSON response, along with a bunch of other information about the stack. To be more useful in scripting, you could use aJMESPathquery to narrow down the data returned to just the parameter's value:aws cloudformation describe-stacks --region <region> --stack-name <stack-name> --query 'Stacks[*].Parameters[?ParameterKey == `<parameter-name>`].ParameterValue' --output text
I have Windows user account credentials passed in as parameters in a CloudFormation template. Using SSM/EC2Config I will need to execute commands on my instances associated with this template, but since only one specific user account on Windows has been granted access to resources I need, I need to specify these same credentials when I execute my Powershell commands via SSM (as just running as Administrator will not have the proper access).The commands will be run later, not at instance launch. Is there any way for me to grab these credentials from CloudFormation? Or any other way to achieve this or something similar?
Can values passed in as parameters be retrieved from CloudFormation for other uses?
You canchange the remote tracking branch of your current branchwith:git branch branch_name -u your_new_remote/branch_nameIn your case:git branch master -u origin/masterThat would makegit statusandgit pushconsider the remoteorigininstead ofheroku.Other solutions are possible:git config branch.master.remote originThis assume that origin does exist.If it does not (seegit remote -voutput), you can declare that new destination with:git remote add origin /new/destination/urlIf you want to completely replace an existing origin setting (for push and pull):git remote set-url origin /new/destination/urlIf you just want the push urlgit remote set-url --push origin /new/destination/urlSee "Change the remote URL to your repository".
I have a node server on Heroku and their terminal extension for git. How can I use both repositories separately? I have a repo on github that I want to use for a different project yet I cannot switch the push destination, it all goes to heroku master.How do I change the branch? I've tried several ways already of setting a git origin branch and trying to push directly to it but it all still shows a heroku master.screenshots removed for privacy, see resolution details in comments
Github and Heroku terminal confusion (osX)
* * * * * sleep 10;curl http://www.google.com/
Simple question: I want to run a cron operation every minute at the 10th second (for example at 2:00:10 PM). The cron operation runs a curl command to download a website page. How can I run a cron operation to do that? Current crontab setting: * * * * * curl http://www.google.com/
How to sleep 10 seconds before running a linux command?
3 With ssh, you can easily name your ssh remote in order to use one set of key or the other, using %HOME%/.ssh/config. (this works for BitBucket or GitHub) See as an example "change github account mac command line" #User 1 on BitBucket Host bitbucketu1 HostName bitbucket.org User git IdentityFile ~/.ssh/id_rsa.user1 #User 2 on BitBucket Host bitbucketu2 HostName bitbucket.org User git IdentityFile ~/.ssh/id_rsa.user2 Then, a git clone bitbucketu1:repo1 would clone a repo from user1. Share Improve this answer Follow edited May 23, 2017 at 11:53 CommunityBot 111 silver badge answered Feb 18, 2013 at 15:19 VonCVonC 1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k bronze badges Add a comment  | 
Any way of configuring ssh to use a different key for each account of bitbucket (or github)? I mean, if I'm going to work with *.bitbucket:user1 ssh should use key id_rsa.user1 and for *.bitbucket:user2 should user id_rsa.user2 Have tried it by doing: IdentityFile ~/.ssh/id_rsa.user1 IdentityFile ~/.ssh/id_rsa.user2 Host *.bitbucket.org:user1* IdentityFile ~/.ssh/id_rsa.user1 User git Host *.bitbucket.org:user2* IdentityFile ~/.ssh/id_rsa.user2 User git But no luck.
Bitbucket different keys and accounts
This can be configured using thesecurity context, e.g.securityContext: runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000Then you don't need the initContainer at all - Kubernetes will handle the recursive chown as part of making the volume ready.One issue here is the Dockerfile linked doesn't container aUSERstatement, so Kubernetes doesn't know to start the pod as the correct user - therunAsUserwill fix that.The reason theinitContainerhack you're trying isn't working is because you're also trying to change the ownership of the read-only config directory. ConfigMaps are mounted read-only, you can't chown them. (This used to be different, but was changed for security reasons)ShareFollowansweredAug 21, 2020 at 7:35Mike BryantMike Bryant1,09299 silver badges1111 bronze badges1Do you know how to still has sudo privileges inside container after setup securityContext?–Gao ShenghanNov 24, 2022 at 1:16Add a comment|
I am trying to create a statefulset that runs zookeper, but I want it to run as non-root (i.e. under the zookeper user).This is the image used for this:https://github.com/kubernetes-retired/contrib/blob/master/statefulsets/zookeeper/DockerfileThis is how I am trying to mount the volumes (Apparently I need a init container according tothis):initContainers: # Changes username for volumes - name: changes-username image: busybox command: - /bin/sh - -c - | chown -R 1000:1000 /var/lib/zookeeper /etc/zookeeper-conf # <<<<--- this returns # cannot change ownership, permission denied # read-only filesystem. containers: - name: zookeeper imagePullPolicy: IfNotPresent image: my-repo/k8szk:3.4.14 command: - sh - -c - | zkGenConfig.sh # The script right here requires /var/lib/zookeper to be owned by zookeper user. # Initially zookeeper user does own it as per the dockerfile above, # but when mounting the volume, the directory becomes owned by root # hence the script fails. volumeMounts: - name: zk-data mountPath: /var/lib/zookeeper - name: zk-log4j-config mountPath: /etc/zookeeper-confI also tried to add the securityContext:fsGroup: 1000with no change.
how to mount volumes as non-root on kubernetes
0 fastcgi leaves processes open and closes the handle within the process of the particular file. this is one of the main differences between fastcgi and regular cgi. also, php has no knowledge of the browser at all. Share Improve this answer Follow answered Feb 21, 2013 at 23:04 bizzehdeebizzehdee 20.7k1111 gold badges4747 silver badges7777 bronze badges Add a comment  | 
I have my PHP app running on Nginx & PHP-FPM. When I used Apache, request abortion (browser closing) terminated php process, but now script continues execution till its end. Nginx fastcgi_ignore_client_abort option is Off and I do not use fastcgi_finish_request function. What can be reason of such behaviour? Or how can I tell php that request is aborted?
Stop php script execution when a browser has been closed
The following articles will be useful:10.3 Specifying Character Sets and Collations10.4 Connection Character Sets and CollationsAfter you connect to the database, issue the following command:SET NAMES 'utf8';Ensure that your web page also uses the UTF-8 encoding:<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />PHP also offers several functions that will be useful for conversions:iconvmb_convert_encoding
I have a backup server that automatically backs up my live site, both files and database.On the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within some of the text. This text is stored within the news database table.Here is a screenshot of it being on the live server and of it on the mirrored server.What could happen within the process of backing it up to the mirrored server?The live server isSolaris, and the mirrored server is LinuxRed Hat Linux5.
Question mark characters display within text. Why is this?
I assume that you mean a PC with multiple GPUs and many PCs with single GPU (Cluster)if this is the case, for a multi-GPU PC you can easily use CUDA library itself and if you connect GPUs with a SLI bridge, you will see improvements in performance.If you want to use a cluster with GPUs, you may use CUDA-Aware MPI. It is combined solution of MPI standard and CUDA library. I suggest you to check this blog post:https://devblogs.nvidia.com/parallelforall/introduction-cuda-aware-mpi/
I am using cuda programming for the effective and fast computation. and during the study I found that multi gpu and the gpu cluster are the other means for the much further effective calculation but I am confused between these two terms.What is the actual difference between these two in terms of programming cuda?
Multi GPU vs GPU cluster
The easiest solution is as you suggested, add an application load balancer that serves a certificate via ACM. The target group would need to be for port 3000, whilst the listener is for HTTPS port 443. When you configure the ECS service if you register the target group with the ECS service, any future changes (such as addition or removal of containers) will automatically be applied to the target group. This must be applied during creation of the service. With the ALB no additional requirements (such as proxies) would be required the container would stay private whilst the ALB would be the only public component. For more information take a read of How can I create an Application Load Balancer and then register Amazon ECS tasks automatically?.
I have an ECS instance running a web server on port 3000. I would like to access my app though this url : https://my-domain.com. This implies: creating a DNS record that points from my-domain.com to the ECS public IP. Having a proxy that has the SSL certificate and forwards inbound connections from port 443 to 3000. What whould be easiest way to accomplish that ? Do I need to use ELB ? Thanks
Make application running in ECS accessible to the world on https
0 Yes you can, please refer to Exchange 2007 and Windows 2008: Online Exchange Backup (part 6 of 7). Get the edb, chk & log file paths using get-StorageGroup, get-MailboxDatabase & get-PublicFolderDatabase for Exchange 2007 or get-MailboxDatabase & get-PublicFolderDatabase for Exchange 2010, and do the usual VSS stuff to copy them. Make sure to signal VSS backup success to purge the log files. Share Improve this answer Follow edited Feb 21, 2012 at 0:37 Matt Fenwick 48.6k2323 gold badges128128 silver badges194194 bronze badges answered Feb 20, 2012 at 18:09 Jimson JamesJimson James 3,06677 gold badges4646 silver badges8484 bronze badges Add a comment  | 
Can Exchange Server 2003 and 2007 be backup up using VSS API's that are provided for exchange 2010? Thanks
Backup of Exchange Server 2003,2007 using VSS API's
The project you pointed to is specific to iSCSI targets running targetd. You basically download the YAML files herehttps://github.com/kubernetes-incubator/external-storage/tree/master/iscsi/targetd/kubernetes, modify them with your storage provider's parameters and deploy the pods using kubectl create. In your pods you need to specify the a storageclass. The storageclass then specifies a the iSCSI provisioner. There are more steps but that's the gist of it.See this link for more detailed instructionshttps://github.com/kubernetes-incubator/external-storage/tree/master/iscsi/targetd
I am using Kubernetes 1.4 persistent volume support, iSCSI/NFS PV and PVC successfully, in my containers. However it needs to first provision the storage by specifying the capacity both at PV creation and during claiming the storage.My requirement is to just provide storage to cluster(and don't want to mention the capacity of storage) and let users/developers claim the storage based on their requirements. So need to use dynamic provisioning using StorageClass. Just declare the storage with details and let developers claim it based on their needs.However got confused about using dynamic volume provisioning for iSCSI and NFS using Storage class and not getting exact steps to follow. As per documentation i need to use external volume plugin for both these types and it has already been made available as a part of incubator project -https://github.com/kubernetes-incubator/external-storage/. But i am not getting how to load/run that external provisioner(i need to run it as a container itself??i guess) and then write storage class with details of iSCSI/NFS storage.Can somebody who has already done/used it can guide/provide pointers on this?Thanks in advance, picku
kubernetes : dynamic persistent volume provisioning using iSCSI and NFS
You are looking at a wrong tool for your job. You use ADF when you for example copy to and from a REST endpoint. ADF is for orchestration and not a streaming tool; it doesn't provide built-in functionality for exposing data as a service endpoint. For this you can write a function that queries from cosmos db and serves a midpoint between cosmosdb and grafana. Another way could be to set your blob storage (where your cosmos db data hits) as a streaming input for a service like ASA, and then stream it to Grafana (you can use functions output of ASA to stream to Grafana). Whereas cosmos db is supported as an output, unfortunately you cannot stream directly from cosmos db using ASA.See this q here:Grafana as Azure Stream Analytics output(it suggests using ADX which might work)Note: Azure monitor is also supported as a plugin for GrafanaGrafana Azure Monitor pluginAzure API management and Web Apps are normally the services used to expose a REST endpoint and manage them.
Is it possible to pass data from a pipeline and stream it through an Azure Data Factory endpoint? The idea is to get data from a query in CosmosDB and pass it to an endpoint to get the info in a Grafana instance.I wondered that it may exist a pre designed endpoint in Data factory to pass the data directlyThanks in advance!
Can I use a Azure Data Factory endpoint to stream the data from a pipeline?
You cannot do that, but you could tell git to ignore further (local) changes to those files. Try:git update-index --assume-unchanged <your_file>
My friend and I have elected to use git and GitHub to collaborate on a project. We are both very new to it.My friend made an initial commit of our project files with his version of the project's config files included in it. My config files will be different. We do not want to send changes to these files back and forth.I have already issuedgit initandgit pull[email protected]:my_friend/our_repository.git masterto get our project files onto my development server.I then created a.gitignorefile in the project root on my dev server (where I didgit init):# this is .gitignore in the project's root directory index.php config/some_config_file.php config/another_config_file.phpSince these config files are already in the repository, these lines in.gitignorearen't going to do anything. I understand this. Other SO answers have suggested these commands:git rm --cached index.php git rm --cached config/some_config_file.php git rm --cached config/another_config_file.php git commit -m "hope this works" git pushbutthis deleted these files in the remote GitHub repository! Not good. I want these files to remain on GitHub so it doesn't alarm my friend.I just want to keep my own unversioned copies of the files on my dev server, independent of whatever is going on in the GitHub repository.How can I achieve this setup with git?
Config files are already in remote git repository. Want to unversion but not delete. How?
If you have read the documentation of statefulset and deployment you might be able to clear the doubt but no worries.here we goStatefulSet is the workload API object used to manage stateful applications. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling.If you want persistent data you should be using the stateful set for applications like RabbitMQ and Elasticsearch.Rabbitmq manages the nodes by node name :https://www.rabbitmq.com/clustering.html#node-namesfor that it mainly uses the stateful sets.You can run the single node RabbitMQ but in that case there will be no HA.There is a difference like in cluster you get HA if you want to implement just mirroring of the queue you can also do it.
I need to setup rabbitmq deployment inside a kubernetes cluster.The rabbitmq is not accessible from outside so I just need a clusterIP service rather than a load balancer.I went through the documentation for Statefulset. But It talks about setting up a rabbitmq cluster i.e one master and two worker nodes.Why can't I just have a rabbitmq deployment with two replicas and persistent volume?This is my current config file for deployment.apiVersion: apps/v1 kind: Deployment metadata: name: rabbitmq-depl spec: replicas: 2 selector: matchLabels: app: rabbitmq template: metadata: labels: app: rabbitmq spec: containers: - name: rabbitmq image: rabbitmq --- apiVersion: v1 kind: Service metadata: name: rabbitmq-srv spec: selector: app: rabbitmq ports: - name: rabbitmq protocol: TCP port: 80 targetPort: 5672What is the right way to integrate rabbitmq inside a k8s cluster?How can I use statefulset for persistent data of rabbitmq?What is the difference between setting up cluster and using just deployment in case of rabbitmq?
Setup rabbitmq deployment with two replicas
My solution is: match owner with slack dictionary where value is slack memberid so it looks likedescription: 'Test: {{ $labels.object }} - <{{ $labels.owner }}>where owner @U012F7F124F <> - required
I have alert rule that notify a public channel in a slack. I want to tag people by nicknames that are in the labels of the monitored metrics. My rule of thumb looks something like this:- alert: test_alert_tag_v1 expr: metric_name{instance="<host>", object="<object_name>"} == 1 for: 1m annotations: summary: 'Test:' description: 'Test: {{ $labels.object }} - {{ $labels.owner }} labels: slackChannel: '<slack_channel>'Where metric_name has "owner" label. And "owner" looks like @slack.nicknameIt works fine with my slack nickname, but doesn't work with other users (mystic).Can you help pls? Or can you tell what solving is better?
How to tag user in slack channel from prometheus alert
Change thisIn yourconfig.php$config['base_url'] = '';$config['index_page'] = '';$config['uri_protocol'] = 'AUTO';then in.htaccess( ** this should be place out side of application folder ** )<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>Read this as wellControllersModelsViewsShareFolloweditedJun 16, 2015 at 11:01answeredJun 15, 2015 at 17:23Abdulla NilamAbdulla Nilam37.2k1818 gold badges6868 silver badges8787 bronze badges5Did u place .htacess file as i mentioned??–Abdulla NilamJun 15, 2015 at 17:38Give me your site url–Abdulla NilamJun 15, 2015 at 17:38this solve the problem but now the views are not loading as expected.–leozeraJun 16, 2015 at 1:07Can you provide me your site URL??–Abdulla NilamJun 16, 2015 at 2:17if my answer helpful grateful by accepting it or Vote it. Thank you–Abdulla NilamDec 27, 2015 at 17:31Add a comment|
In my development environment (Mac OS, Apache, CI app inside a WP folder) my app works fine. Today I deployed it to server (Ubuntu Server, Apache, same CI app inside WP folder) and everything that I try return the 404 page.This is my app/.htaccess:SetEnv CI_ENV development RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]mod_rewrite is already enabled in this server.In my config.php I've already tried:$config['base_url'] = 'http://server/app/'; // problem in both situations $config['index_page'] = 'index.php'; $config['index_page'] = '';What is wrong here? When I go tohttp://server/app/index.phpI get a 404 message. If I go tohttp://server/app/controller/actionI also get a 404 message.
codeigniter returns 404 for everything inside subfolder
Ok, so I change the path to the cookie file fromsessiontotmp/sessionand it works
I want to create a cronjob that interacts with my API. First, I need to send a request to authentificate, then send a GET requestHere is the yaml of my cronjob:apiVersion: batch/v1beta1 kind: CronJob metadata: name: verification-pointage namespace: isi-incubator spec: schedule: "*/1 * * * *" jobTemplate: spec: template: spec: containers: - name: verification-pointage image: curlimages/curl:7.77.0 imagePullPolicy: IfNotPresent command: ["/bin/sh","-c"] args: ["curl -c session -H \"Content-Type:application/json\" -d '{\"username\":\"johndoe\",\"password\":\"johndoe123\"}' http://odoo-api/authentication && curl -b session http://odoo-api/timesheets/verification"] restartPolicy: OnFailureWhen I do the two curl commands in local, I have no problem, but when the commands are executed in the cronjob, thesessiondoesn't seem to have been created. So the second command cannot use the cookie stored in the session file.
cURL doesn't save the cookie inside a k8s cronjob
Your issue arises not from sidekiq but from Rails 3.2.13.#<=>does not handleundefined method to_datetime. It was fixed in future versions of Rails. For example, in the Rails 3.2.22.5:def <=>(other) if other.kind_of?(Infinity) super elsif other.respond_to? :to_datetime super other.to_datetime else nil end endTherefore, the simplest way to solve your issue is to update your Rails version. If it is not an options paste your code or rewrite#<=>.
Start sidekiq with the commandbundle exec sidekiq -e production -P /path/to/pid/file/tmp/pids/sidekiq.pid -L /path/to/log/file/shared/log/sidekiq.log --daemonIn the log error2017-06-29T06:59:44.776Z 16181 TID-1jr7pg ERROR: CRON JOB: undefined method `to_datetime' for #<EtOrbi::EoTime:0x0000000a933848> 2017-06-29T06:59:44.776Z 16181 TID-1jr7pg ERROR: CRON JOB: /home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/activesupport-3.2.13/lib/active_support/core_ext/date_time/calculations.rb:141:in `<=>'error while executing the method/home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/activesupport-3.2.13/lib/active_support/core_ext/date_time/calculations.rb:141:in <=>:def <=> (other) super other.kind_of?(Infinity) ? other : other.to_datetime endWhat can be done with the problem?UPD:Updated version rails to3.2.22.5and there is a new errorERROR: CRON JOB: comparison of Time with EtOrbi::EoTime failed ERROR: CRON JOB: /home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/sidekiq-cron-0.3.1/lib/sidekiq/cron/job.rb:434:in `<'in this placedef not_enqueued_after?(time) @last_enqueue_time.nil? || @last_enqueue_time < last_time(time) end
Error "undefined method `to_datetime'" in sidekiq
Perform the super dealloc AFTER: -(void)dealloc { [_fontName release]; [super dealloc]; } In short, kill your children before killing yourself.
This question already has answers here: Why do I have to call super -dealloc last, and not first? (6 answers) Closed 10 years ago. I have a class with a property defined in the .h file as: @property (retain) NSString *fontName; In the .m file I release the property: -(void)dealloc { [super dealloc]; [_fontName release]; } Now I'm occasionally getting a EXC_BAD_ACCESS error on [_fontName release]. The occurrence is so rare that I'm not really sure how to debug it. Is is correct to release a @property (retain)? Or does [super dealloc] already do that?
Release retain property in dealloc? [duplicate]
16 Sadly there is no way to do that right now. :( Here is a link to the Travis issue on it. Share Improve this answer Follow edited Apr 24, 2016 at 7:55 mernst 7,6733232 silver badges4747 bronze badges answered Feb 26, 2014 at 3:24 joshua-andersonjoshua-anderson 4,47666 gold badges3636 silver badges5757 bronze badges 4 My apologies, I didn't mean to come out as harsh, I meant my response to come out as pointing out a shortcoming in a tool that is on it's way to being fixed. I also added a link to the travis issue on this. – joshua-anderson Mar 4, 2014 at 3:40 4 Note to viewers: Don't let the "Closed" mark on that issue confuse you. The actual issue is tracked in github.com/travis-ci/travis-ci/issues/2614 – Stefan Majewsky Sep 14, 2015 at 7:08 3 Unfortunately, the Travis team locked the issue to prevent further comments or +1s, and haven't responded in nearly a year. – Christopher Jun 30, 2016 at 20:55 3 a few years now... how is this still an issue in an otherwise sweet gizmo? – jettero Jun 9, 2017 at 14:28 Add a comment  | 
Travis has records for a lot of old feature branches, etc. that no longer exist in the corresponding GitHub repository, but they clutter the output of travis branches. Is there a way to prune Travis's list of branches, or at least the ones displayed by the CLI?
Is there a way to prune Travis's list of branches?
Answers to your questions:Do I need anything else other than what I described above?What you described sounds very reasonable. But keep in mind that you don't want to useonedocker container, but ratherone container per service. That means: one container running mongo, one container running node, and so on. That is a Docker best practice.Do I need Vagrant, for example to deploy that docker container or is that an overkill?It sounds like your rather simple setup does not require Vagrant. You can use Dockerfiles to build images that have everything you need installed. See theDockerfile ReferenceandDockerfile best Practices.Can docker specify all my needs, that is the right version of node.js, sails etc?Yes, every Docker image has a certain version of the service that will run inside the container. That's one of the points of using containers.Is there a ready made container I can reuse or modify rather than starting from scratch?Yes, there are many ready made containers to be found on theDocker Hub. Use these images as a base when writing your Dockerfiles to install anything additionally to what is supplied within the image on Docker Hub.Also, check outVolumesto figure out how to handle source code in development.
I am playing around with a MEAN javascript project. (mongoDB + angular + sails.js + node.js) As I am offline a lot of the time, I'd like to keep my dev environment, running in a docker container, on OS X laptop, using boot2docker.The 'production' (not actual production, just somewhere I deploy to to show it to friends) is a Digital Ocean droplet running Ubuntu as host and hopefully the same docker container.I expect that the environment won't change very often and that I can continue using git push/pull to push just the code changes.Do I need anything else other than what I described above? Do I need Vagrant, for example to deploy that docker container or is that an overkill? Can docker specify all all my needs, that is the right version of node.js, sails etc? Is there a ready made container I can reuse or modify rather than starting from scratch?
What is the most simple setup for a MEAN stack docker container to have the same config on OS X and DigitalOcean?
Use the HeapDumpOnOutOfMemoryError and HeapDumpPath options to generate a heap dump when an OutOfMemoryError occurs in the JVM. For example: $ java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/some/path MyApp If you suspect a memory leak, you can use jmap, which is included with the JDK, to produce a heap dump of your application while it's running. For example: jmap -dump:live,format=b,file=dump.hprof <pid> You can then analyze dump.hprof using an application such as YourKit to pinpoint what code is causing the leak. References https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr014.html
This question already has answers here: Set a JVM to dump heap when OutOfMemoryError is thrown (2 answers) Closed 6 years ago. I am a newbie on JAVA. I run a program on top of distributed framework implemented in JAVA. When I use large data, the program crashes due to OutOfMemory with some error stacks. But the error stacks do not contain the information that I am looking for. I want to check what kinds of data structures (java objects) were consuming the heap space at the time when it crashed. Is there any well-known tricks, methods, or tools for it? Thanks,
JAVA/OOM: How to dump all information on java heap space when it crashes due to OOM? [duplicate]
sqldumper.ruizata.com solved my problem.
How do I backup data from a remote MS-SQL Server DB to my local computer?I'm having access to Management Studio 2008.
Backup remote SQL Server 2005
You can usegithub actions cacheto cache things inside your job.If you're using a docker image separately from your job, probably you can't cache that. My suggestion, improve your workflow if you create a job for a test and need the same environment put it all in just onejobwith differentsteps.ShareFollowansweredMar 28, 2022 at 19:10fguissofguisso3855 bronze badges1Thank you for your answer. I'll see if it works well for my project!–Bastien FaivreMar 28, 2022 at 21:46Add a comment|
I actually have GitHub actions that tests a nodeJS project in a Docker image (node:16-alpine). My problem is that at each run,yarn installre-installed completely all the packages. My question is: how can I cache these packages between runs ?I've trouble doing it since the execution run in the Docker image and I could not find a solution to cache the packages. Thank you for your help!
Cache npm packages in Docker GitHub actions
-1If you are not willing to switch to TensorFlow 2.x, you can try updating your GPU drivers, and specifying which GPU to use when running TensorFlow. You can do this using theCUDA_VISIBLE_DEVICESenvironment variable. For example:CUDA_VISIBLE_DEVICES=0 python your_script.pyThis will tell TensorFlow to use the first GPU (with an index of 0) when running your script. You can change the index to specify a different GPU.ShareFollowansweredDec 9, 2022 at 9:57AshAsh1Add a comment|
I'm currently using Tf 1.1.0. I tried to list out the available devices by using the following commandprint(device_lib.list_local_devices())It displayed only CPU but not GPU. When I ran the same command with tf 2.x.x, both CPU and GPU were displayed. Is there a way to make tf v1 detect my GPU,Coz I'm not willing to switch to tf v2My model is being trained on CPU as tf isn't detecting the GPU
GPU not detected by Tensorflow V1
Your problem is your for loop: for (int i = 0; i < sizeof(obvs); i++) More specifically, your porblem is your terminating condition: i < sizeof(obvs) As your code is written, sizeof(obvs) is going to return the size of the memory allocated (in this case, 404 bytes since an int requires 4 bytes of memory) to your array not the size of your array, 101, like you're probably expecting. Change your for loop to read: for (int i = 0; i < 101; i++) or for (int i = 0; i < (sizeof(obvs) / sizeof(int)); i++) And it should fix your problem. A good habit to get into is to store constant values in macros so that you're guaranteed to use the same value each time it's used (and save yourself some headache). So you could rewrite your code to read: #include <stdio.h> #define ARRAY_SIZE 101 int main(void) { int obvs[ARRAY_SIZE]; for (int i = 0; i < ARRAY_SIZE; i++) { obvs[i] = i; } printf("obvs[9] = %i\n", obvs[9]); printf("obvs[13] = %i\n", obvs[13]); printf("obvs[37] = %i\n", obvs[37]); printf("obvs[74] = %i\n", obvs[74]); printf("obvs[99] = %i\n", obvs[99]); return 0; }
This question already has answers here: How do I determine the size of my array in C? (25 answers) Closed 6 years ago. I am a beginner to C and am trying to get more familiar with arrays and the concept of manual memory allocation by doing simple exercises. I have been reading all the (many) questions on SO regarding the "Abort trap: 6" error, and though I've learned a lot, they haven't solved my issue. Similar threads I checked out include: "Abort trap: 6" running C program on a Mac "Abort trap: 6" error in C? ...and more, all slightly different than what I'm dealing with. The problem seems to be that I'm writing to memory I don't have access to, but I thought that by making the array big enough when I declare it, I would avoid this issue. Evidently I was wrong! The code is supposed to simply create an array that holds 100 ints (in positions 0 to 99), and assign each one the value of its position (i.e. the first item in the array should be the int 0, and the last should be the int 99). When I run this code, I get all the example printf statements as expected – with the correct values in them – but it's followed by a line saying "Abort trap: 6". Could someone take a look at my code and tell me what I'm doing wrong to cause this error? #include <stdio.h> int main(void) { int obvs[101]; for (int i = 0; i < sizeof(obvs); i++) { obvs[i] = i; } printf("obvs[9] = %i\n", obvs[9]); printf("obvs[13] = %i\n", obvs[13]); printf("obvs[37] = %i\n", obvs[37]); printf("obvs[74] = %i\n", obvs[74]); printf("obvs[99] = %i\n", obvs[99]); return 0; }
Abort trap: 6 error when working with array in C [duplicate]
Suppose you want to update using you bash script everyday at 12:15am. Then add an entry into/etc/crontablike this15 0 * * * /home/your_bash_script.shJust for additional information, the time entries in cron are added as* * * * * * <your-bash-script-path> | | | | | | | | | | | +-- Year (range: 1900-3000) | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) | | | +------ Month of the Year (range: 1-12) | | +-------- Day of the Month (range: 1-31) | +---------- Hour (range: 0-23) +------------ Minute (range: 0-59)
I have a script I want to update every day. So I have to use a crontab. How can I run the script using the Crontab?UPDATEi use ubuntu.script file
MongoDB - Run script with Crontab
Easisest way I would think is to do git rebase -i B, remove the line for C in the text that git presents and save and let git do the rebase. Note that history will become A-B-D2-E2 ( and can never become A-B-D-E) Note that rewriting history is not always good. If you have published ( pushed) try doing git revert C as that is more safe. the history will become like A-B-C-D-E-C'
How can I remove a specific git commit from the repository? For eg I have commit like A-B-C-D-E and I want to remove the C commit to have A-B-D-E, then how can I accomplish this?
Remove a specific commit from the repository
The issue was solved after updating Snakemake to version 6.5.2 from 5.30.1.
I have written Snakemake rule which runs Muscle (MSA-tool) to calculate multiple sequence alignment (MSA) for all files in a directory. The task is trivially parallel, as different files do not depend on each other. The problem is, that Snakemake runs this rule in n-number of "batches", where n is cores given to Snakemake as an argument:snakemake -j 4 msa.Snakemake starts with running 4 jobs in parallel and it waits until each one of them is finished before starting a new "batch" of 4 jobs. This wastes CPU time, as the input files vary a lot in size and their MSA calculation time can vary from seconds to minutes. Resulting in following execution flow:job1|----- |job5|----- |...|-> job2|--- |job6|-------- |...|-> job3|----------------|job7|-- |...|-> job4|- |job8|----------|...|->How could I tell Snakemake to truly parallelize the jobs?CLUSTER_IDS, = glob_wildcards(os.path.join(WORK_DIR, "fasta", "{id}.fasta")) rule msa: input: expand(os.path.join(WORK_DIR, "msa", "{id}.afa"), id=CLUSTER_IDS) rule: input: os.path.join(WORK_DIR, "fasta", "{id}.fasta") output: os.path.join(WORK_DIR, "msa", "{id}.afa") shell: "{MUSCLE_PATH}/muscle3.8.31_i86darwin64 -in {input} -out {output}"
Snakemake waiting to finish all parallel jobs before starting next parallel job
Once an EC2 instance is launched, it will assign a public and private IP address. An instance's private IP address will never change during the lifetime of that instance.However, its public dns address can change under certain circumstances.So, after you associate an EIP to any instance, use that IP to login into your machine.
I configured my instance. Its up and running. I can ssh in with my key (provisioned by chef/knife) before assigning an elastic IP. For example this works (before EIP):ssh -F .ssh/config ec2-ww-xx-yy-zz.us-west1.computer.amazonaws.comAfter assigning an EIP I get a:Permission denied (publickey)error message as its checking my home folder for the key instead of the project directory.I even specified the config directory an the EIP:ssh -F .ssh/config[email protected]-vwhich returns a "Connection timed out message".When I use Elastic Fox I can see the EIP was associated correctly. Am I missing an AWS setting which denies SSH to EIPs?
can't ssh after assigning an elastic ip
I did dig a little deeper and it turns out that QNetworkRequest CacheLoadControl defaults override QWebSettings setObjectCacheCapacities(), setMaximumPagesInCache() and even clearMemoryCaches()!The trick is to set the CacheLoadControl of the QNetworkRequest to 0, or AlwaysNetwork (http://qt-project.org/doc/qt-4.8/qnetworkrequest.html#CacheLoadControl-enum). The default is 1, PreferNetwork, which fetches from the cache if it's within the Expires header timestamp.I'll leave this here to save a lot of headache to the next person.
I'm trying to force an HTTP request to refresh. I know I can append ?rnd=seconds_since_epoch to the URL, but the URL in question might have a query string already that I don't want to break. Is there a header I can set to force a refresh?Edit:Experimenting a little more: One of the pages I am testing on is stackoverflow.com. In the HTTP response it sets Expires to one minute from the request. The browser seems to be ignoring the "private, no-store, max-age=0" and Expires header that I am setting and caches the response for a minute.I don't want to dig that deep into PyQt networking, so I am going to use the ?rnd=seconds method.Could this potentially break pages that see an unknown GET variable?Edit 2:I did dig a little deeper and it turns out that QNetworkRequest CacheLoadControl defaults override QWebSettings setObjectCacheCapacities(), setMaximumPagesInCache() and even clearMemoryCaches()!The trick is to set the CacheLoadControl of the QNetworkRequest to 0, or AlwaysNetwork (http://qt-project.org/doc/qt-4.8/qnetworkrequest.html#CacheLoadControl-enum). The default is 1, PreferNetwork, which fetches from the cache if it's within the Expires header timestamp.I'll leave this here to save a lot of headache to the next person.
Force HTTP request to not cache
They store the name of the branch from which you want to pull and generate diffs usinggit diff ^target-branch pull-head. When you accept the pull request, they simply rungit merge pull-base.They do not usegit request-pull. There is evena discussion where Linus Torwalds insults them for it:)
Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.Questions asking for code mustdemonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and theexpectedresults. See also:Stack Overflow question checklistClosed10 years ago.Improve this questionI have question about GitHub — how they implemented Pull Request feature. Git SCM itself hasgit-request-pullcommands. According to this answer GitHub can usegit-request-pullandgit-format-patchto do this.How they implemented this feature? And what about Gitorious and Gitlab? How they did the same?
How Github implemented its Pull Request feature [closed]
Found the issue. The -Jprometheus.ip=0.0.0.0 was the correct solution, but there was a bug in my build dockerfile that meant the change to the run script wasn't being picked up. Fixing that bug meant the extra property was correctly added to the run script command line, jmeter could pick it up and the metrics are correctly presented to Prometheus.To find this, I ran the container and then went into the command line to confirm the script. It was clear to see the property was missing.
I have a Jmeter 5.3 container that runs a basic .jmx test. Within the test is Johrstrom's Prometheus plugin, configured for port 9270. If I run the test outside of Docker, I can use 'curl localhost:9270' to get the metrics. It's similar when I run the test inside Docker. If I go to the JMeter Docker command line, I can run 'wget localhost:9270' (curl isn't in the image) and it gives me the metrics.Still in the JMeter Docker container, if I do 'wget jmeter:9270' (jmeter is the name of the container) I get connection refused. The response does includeResolving jmeter (jmeter)... 172.18.0.3So I'm happy that it's not a failure due to the container name. I also have Prometheus running in a separate container, having a target configured for 'jmeter:9270' gives a similar response, the correct resolution of the jmeter name but then connection refused message.I have also tried exposing port 9270, and trying the same 'localhost:9270' from the Docker host. That doesn't work either, I get empty reply from server.What have I missed in the configuration that is preventing me from connecting between containers? Or even why I get 'connection refused' within the same container.I should mention that I'm following the instructions on the Prometheus listener page and adding the following property to JMeter in the container.-Jprometheus.ip=0.0.0.0However I have also tried without this setting and I still get connection refused.
using JMeter Prometheus plugin within a Docker container (connection refused)
This is a known bug that will be fixed in 5.3.
After installing the LDAP plugin you cannot change the admin password, even if you put sonar.security.localUsers=admin in the configuration file and restart. You can goto security\users and use the lock icon but then you get an 'The 'previousPassword' parameter is missing' error message.Is this a bug?Local users should be able to change their password. Workaround: remove LDAP configuration, change password, restore configuration is awkward.
SonarQube 5.2 / LDAP 1.5.1 plugin : admin cannot change password
1 Yes you can definitely run multiple applications on Phusion Passenger. Remember that according to the Phusion Passenger documentation you're supposed to setup a virtual host with a certain domain name, and then pointing that virtual host's document root the application's "public" directory? Well... if you want to deploy more applications, you do the exact same thing. You add more virtual hosts, and in the other virtual hosts you point to other applications' "public" directories. Share Improve this answer Follow answered May 5, 2013 at 11:42 HongliHongli 18.8k1717 gold badges8282 silver badges109109 bronze badges Add a comment  | 
I'm using Passenger as the application server for rails applications in nginx.Is it possible to run multiple rails applications using a single Passenger instance ? Thank You
Running multiple rails applications using Passenger
(I'm answering my own question.)If you're having this issue and not using a VPN, look to see if your VirtualBox's VM is full.The problem is/was that I'd pulled so many images down, that the VirtualBox VM's hard disk was completely full.I'm sure there are more elegant approaches, but I just deleted the vm and created a new one.I did:docker-machine rm default && docker-machine create --driver virtualbox defaultOnce I did that, I was successfully able to use docker as normal. Of course I had to re-pull and/or re-build all my images, but that was pretty fast and not a big deal.ShareFollowansweredNov 5, 2015 at 1:26JT.JT.8,02611 gold badge1515 silver badges1010 bronze badgesAdd a comment|
So, I ran across this today on my local Mac OS X (Yosemite) machine.I was doing a bunch of stuff related to Docker images and when I tried to rundockercommands I was getting errors. I've had problems before where adocker-machine restart defaultfixed my problem, but that didn't seem to help. After booting, I coulddocker ssh defaultand get into the box, butdocker-machine env defaultwould just hang.Googling turned up this Github issue:https://github.com/docker/machine/issues/1500. It didn't address my issue as I don't run VPN software.
`docker-machine env $VMNAME` hangs even when I'm _not_ using a VPN client like Cisco AnyConnect
GIT menu not visiblehelped me to fix this issue, we need to install the followingGIT Bash here andGIT GUI here during the installations.Once installed these, we need to press 'Shift+ right click to get the menu "GIT Repo-browser" to make visible.After performing above things, I'm able to view the 'GIT Repo-browser' menu option[NOTE : Remember the context menu will not be visible for NORMAL RIGHT CLICK instead we need to do a SHIFT + RIGHT CLICK after succesfull installation of Tortoise GIT].Thanks a lot to Stack Overflow community...! :)
I installed TortoiseGit 1.18.16.0 (X64 bit) in my Windows 8 OS.When I do right click on TortoiseGit sub-menu, I'm getting only the following options :SettingsHelpAboutwhereasTortoiseSVN -> Repo Browsermenu option is visible.I even tried enabling the settings dialog of TortoiseGit to enable theRepo browsercontext menu option. But still I'm not able to view the menu.However other Git menus [likePull,Fetch,Diff,Diff with previous versionetc..,] are visible.Only this menu remains hidden :( .Could any one please tell me how to browse the Git repository using TortoiseGit. Suggestions are appreciated!
TortoiseGit Repo-browser context menu not visible
The NET::ERR_CERT_DATE_INVALID error on your screenshot indicates that you're still using the expired certificate, as per the Expired on/Current Date information. If you've followed all the configuration steps correctly, the issue is not certificate-related. Try clearing browser cache and restarting it. Also, check the DNS settings. It could be a DNS propagation delay.
The SSL Certificate used in our ingress resource has expired.The Certificate is used alongside a private key in our ingress.The task is to renew the SSL Certificate and apply it to the ingress resource.We use DigiCert as our Certificate Authority.We have generated a CSR and used it to generate an SSL Certificate.But there is confusion over where the private key is, and how to install the new SSL Certificate.What I have triedis to use the existing private key in the TLS secret, and the new SSL Certificate.But it doesn't work.I generated a new private key, and CSR, used the CSR to get another SSL Certificate, it didn't work.This is my workflowUse OpenSSL to generate a new private key and CSRopenssl req -new -newkey rsa:2048 -nodes -keyout kula-work.key -out kula.work.csrUse the CSR to generate a Certificate from DigiCertUse new SSL Certificate and Private key to create a new TLS SecretReference the new TLS Secret in the Ingress resourceThis is the error I get.
Renewing TLS Certificate on an ingress resource in Azure Kubernetes Service
0 If it's just a matter of having the branch checked out instead of a detached commit, then you use ${TRAVIS_BRANCH} to do that. That variable is either the actual branch name for push builds, the target branch for PRs or a tag name. Travis docs Share Improve this answer Follow answered Jul 10, 2018 at 7:21 renefritzerenefritze 2,1791414 silver badges2525 bronze badges Add a comment  | 
I am using git and have configured travis-ci to build whenever someone commits to the master branch. Looking at the build log, this is what travis-ci does: git clone --depth=50 --branch=master [email protected]:organisation/my-repo.git organisation/my-repo cd organisation/my-repo git checkout -qf 4f177043c790dad8298db4c47eae6893c8894e0c However, I am using a plugin called sbt-release as part of the build and deployment process, which updates the project version and commits and pushes the version changes to the git repository. I have configured travis-ci to run this plugin as part of the build script but because travis-ci is working with a specific commit, the plugin fails: [info] Starting release process off commit: 4f177043c790dad8298db4c47eae6893c8894e0c fatal: ref HEAD is not a symbolic ref I believe the solution is to make travis-ci work with the git HEAD locally rather than the specific commit. Is there a way to achieve this with the travis build configuration?
How to make travis-ci work with a local git branch instead of a specific commit?
You can get follower count usingtotalCountunderfollowers:{ user(login: "parkerziegler") { login name avatarUrl(size: 200) bio company location createdAt followers { totalCount } } }Try it in the explorerYou can checkFollowerConnectionobject
I understand that GitHub's GraphQL APIhas a rate limit, which requires you to use slicing withfirst,last,before,after, etc. However, what if I just want a count of a particular field? For example, I don't want to get all of a user's followers, I just want to get the follower count. Here's the query:query { user(login: "parkerziegler") { login, name, avatarUrl(size: 200) bio, company, location, createdAt, followers { // what can I do here to get the count rather than info on followers? } } }In general,I'm interested in how to deal with these types of calculations in GraphQL, i.e. SUM or ORDER BY. I'm guessing these need to be implemented on the server, but just curious if anyone has any insights. I've been reading a bit aboutpaginationbut don't know if it's the solution for my problem.
Working With Rate Limits on GitHub's GraphQL API
1 You can use the published GitHub API to access commit information. For example, you can get a commit object and use that to populate your download link. If a commit is not appropriate, you could get a tag or a blob and extract the information you want out of that. Share Improve this answer Follow answered Dec 2, 2011 at 8:03 Greg HewgillGreg Hewgill 969k186186 gold badges1.2k1.2k silver badges1.3k1.3k bronze badges Add a comment  | 
I was hoping that I could display a nice download button on my WordPress site to a GitHub repository and include the version number in the text, eg: "Download (v1.2)" but am unsure as to where I can pull that version data from on the public side. If nothing else, last commit date or something would be helpful too. Thanks
Find and display latest version number of Github repo on external site?
.ebextensions are executed in alphabetical order soaws-app-rolewould be the final result for your IamInstanceProfile option setting.Your syntax for the .ebextensions would cause a compilation error if you tried to deploy them, here is the correct way to do what you want.option_settings: "aws:autoscaling:launchconfiguration": IamInstanceProfile: aws-app-role
If I apply a setting in two config files in the .ebextensions folder does the last file override the setting in the first file?For example take two files with instance role setting defined:.ebextensions/0001-base.configoption_settings: IamInstanceProfile: aws-ec2-role.ebextensions/0010-app.configoption_settings: IamInstanceProfile: aws-app-roleWhich role will the Beanstalk EC2 instance be given? aws-ec2-role or aws-app-role?
AWS Elastic Beanstalk .ebextensions order of precedence
Most likely the problem is not related to missing CRDs but to the kubernetes version. I assume you are using the latest K3S version, which isv1.25.4.PodDisruptionBudgetwas moved frompolicy/v1beta1topolicy/v1in versionv1.25. As the Envoy helm chart that you are using does not seem to be actively maintained, probably you will have to downgrade K3S or find a different chart.
My team and I are new to Kubernetes and are experimenting with running a few applications on it.For proof of concept, we have a runningLightweight Kubernetes (K3s)install, which presumably does not have the full range of CRDs available on a standard Kubernetes. While trying to install Envoy proxy viaHelm Chart, we ran into the below error:# helm install my-envoy cloudnativeapp/envoy --version 1.5.0 Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "my-envoy" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" ensure CRDs are installed firstPresumably the messageensure CRDs are installed firstrefers to components that are missing in K3s. Is there a way to get these components installed (via Helm or some other methods)?
Helm install fails on K3s : ensure CRDs are installed first
You should considerhelmcharts in this case, where you separate between the skeleton of templates (or what you called maniest) and its values which are changed from release to another.Intemplates/deployment.yaml:spec: containers: - name: {{ template "nginx.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"And invalues.yaml:image: repository: nginx tag: 1.11.0See the full examplehere
I am learning Kubernetes and planning to do continuous deployment of my apps with Kubernetes manifests.I'd like to have my app defined as aDeploymentand aServicein a manifest, and have my CD system runkubectl apply -fon the manifest file.However, our current setup is to tag our Docker images with the SHA of the git commit for that version of the app.Is there a Kubernetes-native way to express the image tag as a variable, and have the CD system set that variable to the correct git SHA?
How to do variable substitution in Kubernetes manifests?
If you have Sql-Server 2016 SP1 or newer you can audit anything.
What is the best way to audit a view? I set up an audit which outputs to a file, set up a database audit specification for select, insert, delete, update for that view for a specific user (even though I think there should only be select). I enabled the audit and it created the file. However, 24 hours later, there is nothing in that file (other than the initialization info). Is this the right way to audit a view? Thanks!
SQL Server 2016 - Auditing a view
TTL in AKS is available since 1.21.2 version of Kubernetes. For more look atthis github topic:Short update on that. It is available in 1.21.2. Got the confirmation from Azure Support. So, we are currently using it.Make sure that you are using this or newer version. For older versions, you won't be able to run this mechanism. You can also usekube-cleanup operatorfor older versions of cluster.Hereyou can find information how to enable TTL on AKS cluster:Another way to clean up finished Jobs (eitherCompleteorFailed) automatically is to use a TTL mechanism provided by a TTL controller for finished resources, by specifying the.spec.ttlSecondsAfterFinishedfield of the Job.ReferenceWhen the TTL controller cleans up the Job, it will delete the Job cascadingly, i.e. delete its dependent objects, such as Pods, together with the Job. Note that when the Job is deleted, its lifecycle guarantees, such as finalizers, will be honored.So this could help you to enable TTL mechanism on your cluster.
I want to delete completed jobs in my aks cluster after certain time interval using TTL controller, but I'm unable to enable TTL controller in aks cluster, Is there any solution for this problem... Thanks in advance...
Is it possible to enable TTL controller in aks cluster for job automatic deletion
I would ran something like: git fetch --all (update your git's knowledge of remote stuff) git checkout feature ('tags' your folder as code belonging to feature branch and downloading the code) git pull origin staging (downloads staging code and but keeps it as code belonging to feature branch) git add . (marks all code changes for commit) git commit -m'my awesome code changes' ( commits) git push origin feature (Pushing all your changes to feature branch) Well, after pull you most likely will need to solve all conflicts. But this is out of the scope :) But before running any commands from a guy from internet...do a reserve copy :)
I have feature branch called feature and a staging branch called staging. How do I get the most recent updates to staging and merge it into feature before pushing feature to Github?
In what order to execute git commands to pull changes from staging, merge with feature, and push to remote?
Update for 2017-05-05: Docker just released 17.05.0-ce with thisPR #31236included. Now the above command creates an image:$ docker build -t test-no-df -f - . < 00f017a8c2a6 Step 2/2 : CMD echo just a test ---> Running in 45fde3938660 ---> d6371335f982 Removing intermediate container 45fde3938660 Successfully built d6371335f982 Successfully tagged test-no-df:latestThe same can be achieved in a single line with:$ printf 'FROM busybox:latest\nCMD echo just a test' | docker build -t test-no-df -f - .Original Responsedocker buildrequires the Dockerfile to be an actual file. You can use a different filename with:docker build -f Dockerfile.temp .They allow the build context (aka the.or current directory) to be passed by standard input, but attempting to pass a Dockerfile with this syntax will fail:$ docker build -t test-no-df -f - . <<EOF FROM busybox:latest CMD echo just a test EOF unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/bmitch/data/docker/test/-: no such file or directory
Is there a way to build docker containers completely from the command-line? Namely, I need to be able to set things likeFROM,RUNandCMD.I'm a scenario where I have to use docker containers to run everything (git,npm, etc), and I'd like to build containers on the fly that have prep-work done (such as one withnpm installalready run).There are lots of different cases, and it'd be overkill to create an actualDockerfilefor each. I'd like to instead be able to just create command-line commands in my script instead.
docker build purely from command line
I was building the images usingdocker build - < Dockerfilewhich apparently doen't send the build context so things can't be copied. After changing todocker build .and adding the / like MB11 suggested the build worked.
When building my Docker image I need to copy all of the files in the same directory in to the Docker image.I attempted to do thisADD ./* $HOME/src RUN ls $HOME/srcbut it doesn't seem to workls: cannot access /root/src: No such file or directoryHow would I go about copying all of the current directory and subdirectories in to my docker image while building?
Copy current directory in to docker image
6 add: ./configure --build=aarch64-unknown-linux-gnu more info: https://stackoverflow.com/a/68025766/1145929 Share Follow answered Jun 26, 2022 at 23:05 Dawid ChojnackiDawid Chojnacki 6133 bronze badges Add a comment  | 
FROM python:3 USER root RUN apt-get update RUN apt-get -y install locales && \ localedef -f UTF-8 -i ja_JP ja_JP.UTF-8 RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \ tar -xvzf ta-lib-0.4.0-src.tar.gz && \ cd ta-lib/ && \ ./configure --prefix=/usr && \ make && \ make install RUN pip install TA-Lib RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz ENV LANG ja_JP.UTF-8 ENV LANGUAGE ja_JP:ja ENV LC_ALL ja_JP.UTF-8 ENV TZ JST-9 ENV TERM xterm ADD . /code WORKDIR /code RUN apt-get install -y vim less RUN pip install --upgrade pip RUN pip install --upgrade setuptools RUN pip install -r requirements.txt version: "3" services: python3: restart: always build: . container_name: "binancepython3" working_dir: /root/ tty: true volumes: - ./opt:/root/opt pandas requests ccxt == 1.81.77 I'm trying to install talib on docker, but I got an error like below, could you teach me how to solve it? Is the problem caused by the environment? Should I use anaconda instead of python:3? #7 3.276 configure: error: cannot guess build type; you must specify one ------ executor failed running [/bin/sh -c wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && tar -xvzf ta-lib-0.4.0-src.tar.gz && cd ta-lib/ && ./configure --prefix=/usr && make && make install]: exit code: 1 ERROR: Service 'python3' failed to build : Build failed
Install talib on docker
location = /oneapi { set $args $args&apiKey=tiger; proxy_pass https://api.somewhere.com; }
I'd like to add a parameter in the URL in a proxy pass. For example, I want to add an apiKey : &apiKey=tigerhttp://mywebsite.com/oneapi?field=22--->https://api.somewhere.com/?field=22&apiKey=tigerDo you know a solution ?Thank's a lot, Gilles.server { listen 80; server_name mywebsite.com; location /oneapi{ proxy_pass https://api.somewhere.com/; } }
Nginx proxy_pass : Is it possible to add a static parameter to the URL?
Change File permission: chmod +x basics/05_strings.js
bash: basics/05_strings.js: Permission deniedim trying to execute my code in github codespace but its not execute, may be because of exceeding limit of my codespace space, bash is giving me pemission denied message evan i turn on sync to vscode and etc.
Running my program in github codespace - bash: basics/05_strings.js: Permission denied
Crashes cause you first call dealloc of superclass and then try to release attributes. Change this to: - (void)dealloc { [title release]; [date_text release]; [super dealloc]; } And also: I'm almost certain that your self.mainlist is nil, when you're adding objects there. Creating a property doesn't mean that the attribute would be initialized automatically.
I have found a similar issue: NSMutableArray addObject in for loop - memory leak But none of those suggestions seem to fix my problem. I have a simple loop where I'm creating an object and adding it to an array. When I try to release the object at the end of each loop the app crashes with "EXC_BAD_ACCESS". If I don't release the object I get leaked memory: In .h NSMutableArray *mainlist; ... @property (nonatomic, retain) NSMutableArray *mainList; In .m @synthesize mainlist; ... for (int i = 0; i < [self.objects count]; i++) { MyObj *myObj = [[MyObj alloc] init]; myObj.title = [[self.objects objectAtIndex: i] valueForKey: @"title"]; [self.mainlist addObject:myObj]; [myObj release]; // crashes with release } MyObj just has some properties: @property (nonatomic, retain) NSString *title; @property (nonatomic, retain) NSString *date_text; ... @synthesize title; @synthesize date_text; - (void)dealloc { [super dealloc]; [title release]; [date_text release]; } @end Any help would be much appreciated. Thanks.
Objective-c addObject in loop causes memory leak
The vertical bar stands for a logicalOR, and lets you specify either a trailing slash after 'registration' or not.I prefer using a '?' after the slash, making it optional:RewriteRule ^registration/?$ /index.php
I've seen examples in htaccess files using mod_rewrite where everything is done through one php file and different URLs are redirected back to index php.RewriteRule ^registration(|/)$ /index.phpI'm curious as to what(|/)$does/is. I've read a lot of stuff and can't seem to find any mention of the use of a vertical bar in mod_rewrite and if I remove this, the redirect still works fine.
What does (|/)$ do with mod_rewrite?
I don't know that it's described in the plugin page or the Wiki, but at least according to the Advanced Features/Additional Behaviors, the git plugin can be configured to do what you're looking for in multiple ways. eg: Polling ignores commits in certain paths lets you specify an Included region or Excluded region" The help (?) says: Each exclusion uses java regular expression pattern matching, and must be separated by a new line. myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gif The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur. You'd have to try them out. One less plugin - KISS!
Is there any way to avoid triggering build on certain file commits which are not directly related to source code? e.g. I don't want to trigger a automatic build when anyone make changes to README.md file or some reference document file.
Avoid triggering build on certain file changes (e.g README.md)
You can use an if statement to do a conditional rewrite. (seehttp://wiki.nginx.org/IfIsEvil) Replace the words between bars like "foo" with the user agent strings you want to match against. You may want a location that has a different document root from your default location. Usinglastis transparent to the user.redirectresults in a 302.### case sensitive http user agent blocking ### if ($http_user_agent ~ (FooSomething|BarElse) ) { rewrite ^ /static-html/your-browser-too-old.html last; } ### case insensitive http user agent blocking ### if ($http_user_agent ~* (foo|bar) ) { rewrite ^ /static-html/your-browser-too-old.html last; } location /static-html { root /var/www/static-html; }
How to return a simple html file in the processing of older browsers. This is a file in the system. Examplenginx.confif ($ancient_browser) { return /fuul/path/to/file/browser.html; #- how? }
Nginx redirect to html file
Everything on your site is in a sub directory off of the domain so the main site is accessed here http://fl4m3ph03n1x.github.io/web-tutorials/ The templates are pointing to directories on the root of the domain so it is trying to load your stylesheets from http://fl4m3ph03n1x.github.io/assets rather than where they are located http://fl4m3ph03n1x.github.io/web-tutorials/assets/ the same thing is happening for your posts. What you need to do is set the baseurl in your _config.yml baseurl: /web-tutorials you then need to modify your templates so that the paths to CSS and JS use the following convention {{ site.baseurl }}/path/to/css.css and for post links {{ site.baseurl }}{{ post.url }} You also need to update the site setting in _config.yml
I am desperate.My mission is to deploy a static website generated using Jekyll into GitHub Pages, using the "Project" option (instead of the user option). Somehow, when I use Jekyll to check the website in my machine, everything works fine. But once I deploy it to Git Pages, all my CSS files stop working, and every link leads to a 404 not found error. I have followed several guides and tutorials but they all fail: Using Github Pages to host a website v2 Jekyll Documentation Building Static Sites with Jekyll building-a-docs-site-with-jekyll-github-pages So far I always created the repositories, the branches and I always push everything. I do not believe the error is in the deployment, but in some place else. My repo can be found here: Fl4m3Ph03n1x web-tutorials repo For those of you wondering, so far the repository is only the result of one tutorial: - AndrewMunssel tutorial I have also tested other tutorials, but I always end up with a problem. Is my code wrong? Are the tutorials I am following outdated and incorrect? What should I do?
Correctly hosting Jekyll website on Git Pages
See this linkhttp://docs.grafana.org/features/datasources/prometheus/#templated-queriesTo use Template Query is help for you.First, you should define label_values with metric or not. and, extract what you want in your panel.this is my dashboard. I have importedNode Exporter Server metrics, and modify 'instance' to 'alias' in Template Query. I hope this will help you.
I am currently facing an issue with Grafana/Prometheus. I've got apaneland I am trying to add different queries to it. To be able to configure thresholds I should give every query a unique alias but I really don't know how to do that.Could anybody provide an example to me?Thanks in advance.
How to set alias for Grafana Query with Prometheus Input
4 Everybody can create a fork. But only the repo owner/maintainer has permission to push commits to the original repo. So you have to create a pull request, to notify the owner/maintainer about the change in your fork. The maintainer then does a review, and decides whether to push if your change is worthy. This is the workflow, to keep the quality of the original repository. Share Follow edited Aug 22, 2022 at 5:42 hippietrail 16.4k1919 gold badges102102 silver badges166166 bronze badges answered Nov 25, 2020 at 9:43 James PhungJames Phung 4144 bronze badges 1 How exactly do you publish a new branch on upstream with a pull request? PRs merge or rebase one branch into another. – secondman Mar 9, 2023 at 2:32 Add a comment  | 
I forked a repo and worked on one of its branches. From there, I created a new branch, e.g. newB1 and pushed the changes there. I see the newB1 in my forked repo, but it does not appear to the original repo. How do I push this new branch to the original report as well?
How to push my new branch to original repo
Easiest is to clone the repo again.
I wish to update a repo on GitHub but I ended up deleting it on my local Mac. There seems to be so many different commands and possible combinations to do things that I worry I will permanently break something. My only experience with Git is just committing the final project once it is complete. I want to preserve the old history (to show that I made this one or two years ago, for example). Should I just: Download a copy from GitHub? Clone it? Branch/Checkout? Thank you for any assistance.
Best or ideal way to update a repo on GitHub when the local on your computer is gone/deleted?
The notice from thescriptisThis script, located at https://deb.nodesource.com/setup_X, used to install Node.js is deprecated now and will eventually be made inactive. Please visit the NodeSource distributions Github and follow the instructions to migrate your repo. https://github.com/nodesource/distributions The NodeSource Node.js Linux distributions GitHub repository contains information about which versions of Node.js and which Linux distributions are supported and how to install it. https://github.com/nodesource/distributionsTheinstructions on githubamount to a DockerfileRUNFROM docker.io/debian:12-slim RUN set -uex; \ apt-get update; \ apt-get install -y ca-certificates curl gnupg; \ mkdir -p /etc/apt/keyrings; \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \ NODE_MAJOR=18; \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ > /etc/apt/sources.list.d/nodesource.list; \ apt-get -qy update; \ apt-get -qy install nodejs;Thedocker.io/node:18image maintained by the Node.js project is Debian based if you want to save some time.FROM docker.io/node:18-bookworm-slim
I used to install nodejs on Debian based container using the following in the Dockerfile:RUN apt-get update -yq && apt-get upgrade -yq && apt-get install -yq curl git nano RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get install nodejs -yBut I recently started getting the following message:=> [base 3/7] RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - SCRIPT DEPRECATION WARNING ================================================================================ TO AVOID THIS WAIT MIGRATE THE SCRIPT Continuing in 60 seconds (press Ctrl-C to abort) ...How do I fix it?
Deprecation warning when installing nodejs on docker container using nodesource install script
Whenever distinct AWS services interact it is necessary to grant them the necessary access permissions using AWS IAM.In this case, it's necessary for Cloudwatch Events to have access to execute the Lambda function in question.Step 2 ofthe AWS tutorialdescribes how to do this using the AWS CLI. The Terraform equivalent of theaws lambda add-permissioncommand istheaws_lambda_permissionresource, which can be used with the configuration example from the question as follows:data "aws_caller_identity" "current" { # Retrieves information about the AWS account corresponding to the # access key being used to run Terraform, which we need to populate # the "source_account" on the permission resource. } resource "aws_lambda_permission" "allow_cloudwatch" { statement_id = "AllowExecutionFromCloudWatch" action = "lambda:InvokeFunction" function_name = "${aws_lambda_function.cleanup_daily.function_name}" principal = "events.amazonaws.com" source_account = "${data.aws_caller_identity.current.account_id}" source_arn = "${aws_cloudwatch_event-rule.daily_rule.arn}" }AWS Lambda permissions are an abstraction over IAM roles and policies. For some general background information on IAM roles and policies, seemy longer answer to another questionwhere more manual configuration was required.ShareFollowansweredJun 1, 2017 at 17:34Martin AtkinsMartin Atkins67.8k88 gold badges132132 silver badges152152 bronze badges0Add a comment|
I'm trying to configure cloudwatch rules that'll trigger lambda functions on a specific day/time with the following:resource "aws_lambda_function" "cleanup_daily" { filename = "name" function_name = "name" role = "arn<removed>" handler = "snapshotcleanup.lambda_handler" source_code_hash = "${base64sha256(file("file_name"))}" runtime = "python2.7" timeout = "20" description = "desc" } resource "aws_cloudwatch_event_rule" "daily_rule" { name = "name" description = "desc" schedule_expression = "cron(....)" } resource "aws_cloudwatch_event_target" "daily_target" { rule = "${aws_cloudwatch_event_rule.daily_rule.name}" arn = "${aws_lambda_function.cleanup_daily.arn}" }However the lambda functions do not run. If I look at lambda and check the triggers tab, there's nothing there. If I look at the cloudwatch rules and look under Targets, the lambda function shows up and if I click on it I'm redirected to the function itself. Any ideas what might wrong here?For one of the cloudwatch rules I clicked on edit -> save -> configure details -> update without changing anything and that now shows up under the trigger tab in lambda but still need to get the others to work w/o this step,
aws terraform cloudwatch rule as lambda trigger
We are currently working on this, so this limitation will be fixed in upcoming SonarQube 5.1 (ETA end of February 2015) as you can see in the ticket.Meanwhile, you have a workaround given in the last comment of the ticket.
Can anyone suggest an effective solution for this:https://jira.codehaus.org/browse/SONAR-5049.We are a global team working with a Sonar CI server.
Preview analysis might be impossible if it occurs right after an analysis that was executed on a different timezone
Every commit is a snapshot of your entire project. Each commit contains all the files. Thelastcommit (also called the head) is thecurrentstate of all thecurrentfiles.When you do a normal push, your local commits are added to the end of the remote branch. But when you use force, your commitsreplacethe commits of the remote branch.So if your last local commit does not contain the readme, then after the force push, the remote repo also does not contain it.
why, when I usegit push origin master --forcemy readme. file or some file in my reop was deleted? one day, when I edit my readme file in GitHub unless used git and make commit change, was deleted too, I wont know why this thing done
why when use push origin master --force my readme.file was deleted?
It doesn't seem possible, considering the syntax- v /host/path:/container/pathis reserved for mounting a path from host (and not from another container)That leaves you with the option of adding to your second container a symbolic link from/etc/otherdirto/source/somedir(which will exist because of the--volumes-from contAdirective)
Is it possible to mount a volume from a container into another container on a different path? E.g.contAexposes a volumen/sourcemounting it in another containerdocker run --volumes-from contA -v /source/somedir:/etc/otherdirI'm trying to use this withdocker-composeandjwilder/nginx-proxy:docker-compose.ymlmyapp: build: . command: ./run.sh volumes: - /source nginx: image: jwilder/nginx-proxy volumes_from: - myapp volumes: - /source/vhost.d:/etc/nginx/vhost.d:ro - /var/run/docker.sock:/tmp/docker.sock links: - myapp:myappIf I'm trying so, I can't see my files at/etc/nginx/vhost.d:$ docker-compose run nginx bash root@f200c1c476c7:/app# ls -l total 32 -rw-r--r-- 1 root root 1076 Apr 9 22:10 Dockerfile -rw-r--r-- 1 root root 1079 Apr 9 22:10 LICENSE -rw-r--r-- 1 root root 129 Apr 9 22:10 Procfile -rw-r--r-- 1 root root 8385 Apr 9 22:10 README.md -rw-r--r-- 1 root root 5493 Apr 9 22:10 nginx.tmpl root@f200c1c476c7:/app# ls -l /etc/nginx/vhost.d total 0 root@f200c1c476c7:/app# ls -l /source/nginx/ total 8 -rw-r--r-- 1 1000 staff 957 Apr 24 07:17 dockerhost.me
Mounting a container volume into another container on a different path
The problem was that, while configuring Cloud Build with GitHub, we had pushed too many buttons.This is an overview of what we needed to reset.InGitHubGo to the affected repository.Open its settings.Delete theWebhookassociated withsource.developers.google.com/webhook/github.Delete theDeploy keyassociated with Google Connected Repository Fingerprint.InGoogle Cloud Console(console.cloud.google.com)OpenSource RepositoriesDisconnect the mirror of the affected repository.OpenCloud BuildDelete and recreate the Build Trigger(s) for the affected repository.Aside re: theGoogle Cloud Build GitHub AppSetting up specific triggers in Google Cloud Build is orthogonal to using the Google Cloud Build GitHub app. The former does not require the latter. They are different ways to do similar things.If you had installed the Google Cloud Build GitHub App in your GitHub account because you thought it was required for Google Cloud Build Triggers, then uninstall the Google Cloud Build GitHub App. It works differently than setting up specific Google Cloud Build triggers does, and I found it quite confusing to have both running.
We installed the Google Cloud Build GitHub app. We then created some Build Triggers with the Google Cloud Build web user interface. This worked for a while.Recently we pushed new branches to our GitHub repositories and tried to create Google Cloud Build Triggers for those branches. The Trigger Settings page says "No branch matches" even though we are 100% sure that the branch exists on GitHub.How can we refresh the branch listings in the Google Cloud Build Trigger Settings page?We have tried logging in/out of Google Cloud Build and GitHub. We have also tried uninstalling and re-installing the Google Cloud Build GitHub app. We have also tried simply waiting for a few hours.
Cloud Build Trigger Settings have stale, out-of-date GitHub branch data
Since this is ASP.NET, theCache.Insert()method allows you to specify a callback delegate.Does this sound like a sensible approach?Yes, the callback (and File-dependency) are supplied for exactly this kind of situation. You still have ro make a trade of between resources, latency and out-of-dateness.
I currently cache the result of a method invocation.The caching code follows the standard pattern: it uses the item in the cache if it exists, otherwise it calculates the result, caching it for future calls before returning it.I would like to shield client code from cache misses (e.g. when the item has expired).I am thinking of spawning a thread to wait for the lifetime of the cached object, to then run a supplied function to repopulate the cache when (or just before) the existing item expires.Can anyone share any experience related to this? Does this sound like a sensible approach?I'm using .NET 4.0.
Automatically re-populate the cache at expiry time
No need. If you use gh3.js you can request the contents of a file without an access token. This sample file has all the code you need. Download/clone to desktop and pop open in a browser.
I'm trying to get a file from a github repo purely from JS. What do I need to do to initialize the connection with my API token? Also, do you need a API token just to get a single file from a repo via the API? Or maybe I'm not meant to use the Github API directly from JS; This github help page says that tokens are like passwords, then I suppose I'll have to make an AJAX/GET request to a server-side script, and the said script should then request the data I need from github? This is the code I am using to get a certain file from the repo. $.ajax({ url: "https://raw.githubusercontent.com/:rhino/:rhino.github.io/master/:README.md", dataType: 'jsonp', success: function(results){ var content = results.data.content; alert(content); }});
How to initialize the Github API with an API token?
Unfortunately, OpenCL for GPUs does not work in WSL.However you might be able to get PoCL running on the CPU in WSL.
I followed the steps provided by this link (install lightgbm GPU in a WSL conda env) to install lightgbm, but encountered a problem.LightGBMError: No OpenCL device foundI have tried this commandmkdir -p /etc/OpenCL/vendors && \ echo "/usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd, But the problem has not been solved
Problems encountered when installing the gpu version of lightgbm in ubuntu system on wsl2
The solution appears to have been to restore the shell colors to default, and restart all the relevant services. Because I am unsure as to what was preventing the default colors to fix the problem, the solution may require an OS reboot.
(Windows Git-bash) When I use git bash for terminal in a project for IntelliJ I have problems when I log into a docker container and use ls. Text gets highlighted light blue and the color doesn't go away until I exit. Any thought on how to correct this? I suspect this comes from IntelliJ's recoloring of the shell colors. Perhaps there is a way to remove the influence of the Darkula theme colors? Here is what the same looks like on a normal OS panel:
(Windows Git-bash) IntelliJ git bash shell color scheme messed up with Docker
The names (Keys) you assign an object in Amazon S3 are frankly irrelevant.What matters is that you have adatabase that tracks the objects, their ownership and their purpose.You should not use the filename (Key) of an Amazon S3 object as a way of storing information about the object, because your application might have millions of objects in S3 and it is too slow to scan the list of objects to see which ones exist. Instead, consult a database to find them.To answer your question:Yes, create a prefix by username if you wish, but then just give it a unique name (eg aUniversally unique identifier - Wikipedia) that avoids name clashes.
I have a social media web application. Users upload pictures such as profile picture, project pictures, and etc. What's the best way to organize these files in a S3 bucket?I thought of creating a folder withuseridas its name inside the bucket and the inside that multiple other folders i.e. profile, projects and etc.Not sure if that's the best approach to follow!
Organizing files in S3
The error message is probably coming from HeapAlloc() in ntdll.dll. I can reproduce the message with the following code: HANDLE hHeap = HeapCreate(0, 0, 4096); LPVOID p = HeapAlloc(hHeap, 0, 0x99999998); The message gets sent to the debugger output window by DbgPrint() in ntdll.dll, so I would try setting a breakpoint there (it's an exported function, so you won't need a symbol file to find its address) and then looking at your call stack.
The MFC program I am debugging is printing this message in the "Output" window in Visual Studio 9.0: HEAP[AppName.exe]: Invalid allocation size - 99999998 (exceeded 7ffdefff) I'm pretty sure this is due to a bad "new", uninitialized variable or similar error. The question is: how do I get the debugger to stop on this message so that I can view the stack trace and solve the problem? Edit: The following snippets do not yield the same warning. They produce the Invalid allocation size: 4294967295 bytes. style message instead. int stupid = -1; char *bob = new char[stupid]; And: malloc(-1); So, I suspect it's coming from within a system DLL with its own memory management or is using a different API.
Visual C++: Invalid allocation size. How to force the debugger to stop on this message?
Run ovpn with a deamon in Dockerfile CMD openvpn --daemon --config config/fremsyn.ovpn --auth-user-pass config/login.txt --askpass config/password.conf && python3 src/cli/getStatus.py For run the service use docker-compose.yml like this : docker-compose.yml version: "3.3" services: name_of_your_service: image: your_image_from_Dockerfile_build restart: always sysctls: - net.ipv6.conf.all.disable_ipv6=0 cap_add: - NET_ADMIN devices: - /dev/net/tun volumes: - /etc/timezone:/etc/timezone:ro Run command $ docker-compose up -d
I am trying to create a docker image which has a python script that connects to an API through VPN using openVPN, however, I cannot seem to get openVPN to be working. I my docker file I have # Install openVPN and get confi files RUN mkdir /config ADD ./config/. /config RUN apt-get install -y openvpn # Run openvpn and script CMD openvpn --config config/fremsyn.ovpn --auth-user-pass config/login.txt --askpass config/password.conf && python3 src/cli/getStatus.py But I keep getting the error: ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2) Is there a solution to this problem? As a side note, I need to run the container as container instance in Azure.
openVPN inside docker image
Personnaly I use os.path.expanduser to find a good place for caches, it's quite common in unix environnement where most of the current user's config/cache is saved under his home directory, the use of a directory name starting with a dot, making an "hidden" directory. I would do something like : directory = os.path.join(os.path.expanduser("~"), ".my_cache") As for the modification date of the distant file you can use urlib : import urllib u = urllib.urlopen("http://www.google.com") u.info().get("last-modified") However you should check that your HTTP server provides the last-modified HTTP header and that it is a coherent value ! (This is not always the case)
My pygtk program is an editor for XML-based documents which reference other documents, possibly online, that may in turn reference further documents. When I load a file, the references are resolved and the documents loaded (already asynchronously). However, this process repeats every time I start the editor, so I want some local caching to save bandwidth and time for both the user and the server hosting the referenced documents. Are there any typical ways this is done? My idea so far would be: Get a path to a cache directory somehow (platform-independent) Any ideas? Put a file named md5(url) there. If there is a cache file already existing and it's not older than $cache_policy_age take it, otherwise use HTTP (can urllib do that?) to check if it has been modified since it was downloaded.
Good way (and/or platform-independent place) to cache data from web
You can find answer on the github support.There are technical limitations, we tried this in the past and it had a negative impact on performance. If we find a solution, we'll re-implement it.https://help.github.com/articles/getting-the-download-count-for-your-releases/
This question already has answers here:Closed11 years ago.Possible Duplicate:Github: Can I see the number of downloads for a repo?Can anybody tell where can I found the number of downloads of my project on GitHub?
How to see count of project downloads on GitHub? [duplicate]
I was getting the same error. It's not related to your CA cert, it's a different thing, related to your client certs.In charles, go to the Proxy menu and choose "Client SSL Certificates"For some reason I had a mapping from.to blank/nothing. Maybe you do too. If so, remove all your mappings here and it will probably fix it.
I have Installed charles and installed the charles CA SSL certificates as per help menu, with success confirmation. BUt as I try to open any url with charles running, I am continuously getting an pop-up error of "certificate file does not exist".Can some one please help me on how do I workaround the issue and still work with charles successfully.
"certificate file does not exist" error when using charles web debugging proxy
Here is the .htaccess i use on my site to redirect all /tds/tre to the index except when called url is a directory or file.RewriteEngine on RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?syst=$1 [QSA,L]
So I have little bit html on the footer.php and I cannot load the javascript filesFooter.php<footer> Test </footer> <script src="./assets/js/jquery-2.2.4.min.js" type="text/javascript"></script> <script src="./assets/js/bootstrap.min.js" type="text/javascript"></script> <script src="./assets/js/npm.js" type="text/javascript"></script> <script src="./assets/js/test.js" type="text/javascript"></script> </body> </html>So when I see on the network on the browser I see the four js files is load like type html.I used the Eclipse for PHP developers. How can I make the javascript files is load like javascript files not like html files.When is load is have the mistake for every js file.SyntaxError: expected expression, got '<'Edit: Index.php I not have any logic.Index.php<?php include 'views/elements/header.php'; ?> <?php include 'views/elements/footer.php'; ?>In header I don't have any php or html codeEDIT:I find my problem is in .htaccess. This is my .htaccess file and when I delete then is working.<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUIEST_FILENAME} !-d RewriteCond %{REQUIEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule>could some one tells me how can make .htaccess to working correct. Or some link from where can I see how to configurate the .htaccess file.
How to load the javascript file in html (php) file
The container registry it seems has to be configured with credentials. Once configured in Settings->Access Keys, take the admin user and password.Run below:sfctl compose create --deployment-name NAME --file-path docker-compose.yml --user ADMIN_USER --has-passThis would prompt for the password, the pull would go on fine now.or try the encyption ( I did not explore it)Please explore this link for other options:Configure container repository credentialsYou can also try making the registry public for specific IP range ( machine from where you are deploying )Configure public registry accessShareFollowansweredNov 18, 2020 at 16:33TechFreeTechFree2,71311 gold badge2020 silver badges2020 bronze badgesAdd a comment|
I'm trying to deploy a Docker Compose to Service Fabric. The cluster created from Azure Marketplace consists of five UbuntuServer 16.04-LTS.I'm using the 'Deploy docker-compose application to a Service Fabric cluster' task to deploy the docker compose file. But when Service Fabric deploys the container, I receive the following error (In Service Fabric Explorer):There was an error during download. Container image download failed for ImageName=xxxx. DockerRequest returned StatusCode=InternalServerError with ResponseBody=. The image has been pushed to Azure Container Registry. I can docker pull and run the image locally. Does anyone have a clue on what could be going on?
Service Fabric: There was an error during image download
I would say sticking with MS technologies would be the best since you're already using ASP.NET. AppFabric was designed just for this case. OtherwiseMemcachedis a good alternative.
In ASP.Net 4.0 which is the best way of storing the cache object when we go with webfarm ,1) Windows Server AppFabric2) Separate State Machine / SQL Server3) Thrid party caching mechanisms / Others ?.
ASP.Net 4.0 web farm caching
, how can I remove the file from the repository such that .gitignore would ignore the file when I run git addFirst, you don't have togit addto check if the .gitignore is working or not.A simplegit statusis enough.Orgit check-ignore -v -- System2/Benchmark/sys2.xtc(assuming the file is there): a rule would mean the file is ignored. Empty output means the file isnotignored.Second, make sure your file is not in a submodule or a nested Git repository, as anygit rmcommand done from the parent repository would not apply.Third, if the file was committed in the past (and since deleted), you might need tocleanup your history withgit filter-repo.
I first found that .gitignore was not working for me even if I've specified the files that I didn't want to add. I tried usinggit rm --cachedto untrack those files but I was stuck with the following error:fatal: pathspec 'System2/Benchmark/sys2.xtc' did not match any filesI've made sure that the file did exist, but git seemed not able to find it.Since the size of this file is larger than 100 MB, I really needed to make .gitignore work for it. I'm wondering how I could solve the error I had when runninggit rm --cached. Thanks!
git rm failed with fatal: pathspec xxx did not match any files
Deleting calico-Iptables:Usecalico-policyand add below lines at the end of script:echo "Flush remaining calico iptables" iptables-save | grep -i cali | iptables -F echo "Delete remaining calico iptables" iptables-save | grep -i cali | iptables -XThis will delete all calico iptables when you check withiptables -SNote:Run this script only after uninstalling K3S.Deleting calicoctl:Simply runsudo rm $(which calicoctl)command, it will find and delete the calicoctl.
I have a K3s setup with calico pods [calico-node-&calico-kube-controllers-] running. On uninstalling K3s, calico pods get deleted but I see thatcalicoctlandiptables -Scommands still running and shows data.I want to delete calico (includingcalicoctlandIptablescreated by calico) completely. Which commands will help me to do so ?K3s uninstalltion command:/usr/local/bin/k3s-uninstall.shdeletes all k3s pods including calico, butcalicoctlandiptables -Sstill works.PS:I already tried few things -Commandkubectl delete -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.5/config/v1.5/calico.yamldeletes thecalico-node-butcalico-kube-controller,calicoctlandiptables -Sare still presentKubectl deletecommands inthis quealso not working for me, after executing these two commands stillcalicoctlandiptables -Sare present
How to delete calicoctl and iptables (created by calico installation) from my k3s
0 It might be easier to do said cleanup in a local copy of that GitHub wiki, since it is a Git repo in itself: git clone https://github.com/<user>/<yourProject>.wiki.git Once cloned locally, you can clean it up, modifying / moving files, and then push it back. Share Improve this answer Follow edited May 23, 2017 at 12:05 CommunityBot 111 silver badge answered Nov 18, 2014 at 11:56 VonCVonC 1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k bronze badges 1 Thank you. I aware of this possibility but I do not know how to continue from here. Using a normal editor with a bunch of .md files is not working very well in my experience. – Mario Konschake Nov 18, 2014 at 14:30 Add a comment  | 
We are using the a GitHub wiki for all our in-company documentation. As this got messy with time we would like to do a clean-up. However we find neither git nor the GitHub front end very convenient to do so. Are there any tools available to facilitate such a process which I've missed. Thanks.
Clean-up/refactor Github wiki
I met the same error today,I google this issue and find below comments:https://help.github.com/articles/working-with-large-files/If you attempt to add or update a file that is larger than 50 MB, you will receive a warning from Git. The changes will still successfully push to your repository, but you can consider removing the commit to minimize performance impact.so I used the following command to resize the buffer size, it worksgit config http.postBuffer 52428800
While pushing the file to github I get the above mentioned error. In detail the error is as follows:Connection reset by 13.234.176.102 port 22 fatal: The remote end hung up unexpectedly fatal: sha1 file '<stdout>' write error: Broken pipe error: failed to push some refs to 'Github URL'Is it File size issue or its corrupted?
How to sove the error 'The remote end hung up unexpectedly fatal: sha1 file '<stdout>' write error: Broken pipe error'?
Amazon S3 is what gives a developer their power. It's an energy field created by objects stored in the cloud. It surrounds us and penetrates us. It binds the Internet together. Some may mock Amazon S3 because they cannot sense invisible objects in their bucket. But the wise Jedi amongst us will check whether the bucket has Versioning enabled. When attempting to rid the galaxy of their bucket, they might see messages such as: $ aws s3 rb s3://rebel-base --force remove_bucket failed: An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The rebel base you tried to destroy is not empty. You must delete all versions in the bucket. If such resistance is met, sneak into the Amazon S3 management console, select the bucket, choose Versions: Show and reach out with your mind. If any deleted versions of objects are displayed, delete them within this view until all objects cry out in terror and are suddenly silenced. If this does not lead to the resolution you seek, then check that your Master has allocated sufficient access privileges for you to access the central computer and this particular bucket. It is also possible that these buckets have bucket policies that override the central computer via Deny policies. If so, attempt to bypass security by deleting the bucket policy first, then destroy the rebel bucket. You know better than to trust a strange computer!
I can't get rid of five buckets in S3. Every screen in the AWS console says "Error Data not found" (i.e. Overview, Properties, Permissions, Management, Access points). I can't set lifecycle rules to delete objects, but the buckets never had anything in them and versioning was never enabled anyway. I've also tried forcing it in my terminal... aws s3 rb s3://bucketblah --force ...but it fails and I get remove_bucket failed: Unable to delete all objects in the bucket, bucket will not be deleted. Help me Obi Wan...
Can't delete S3 buckets - Error Data not found
I tried all the solutions but none helped. The problem was, I was still unable to access the environment variables(DBUS_SESSION_BUS_ADDRESS). So one could check if those are available first.What worked for me is simply running the script in current shell environment. This can be done by running the script with a.as in cronjob file -* * * * * . /path/to/script/Wallpaper_Changer.shMore information :Global environment variables in a shell scriptUnderstanding Unix shells and environment variables
My script -#!/bin/sh # export DBUS_SESSION_BUS_ADDRESS environment variable PID=$(pgrep gnome-session) export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) DIR="/home/umang/Downloads/Wallpapers" PIC=$(ls $DIR/*.jpg | shuf -n1) /usr/bin/gsettings set org.gnome.desktop.background picture-uri file://$PICcronjob file -* * * * * /path/to/script/Wallpaper_Changer.sh * * * * * date >> /path/to/logfile/CronTest.logWallpaper changes correctly via terminal and the dates are logged via cron.I am running ubuntu 14.04, GNOME Shell 3.12.1. Help me change wallpaper on gnome as well as unity.
Unable to change wallpaper using cronjob on ubuntu
It's actually not a problem but you can say it featured by package-manager with Alpine you are using image: docker:stable or any such images like tomcat or Django they are on Alpine Linux. with minimal in the size .image: docker:stable stages: - test - build before-script: - apk add python python-dev python pip test1: stage: test script: ... - pytest build: stage: build - docker build -t $IMAGE_TAG . - docker push $IMAGE_TAGapk is Alpine Linux package management
I use gitlab ci to build docker image and I want to install python. When I build, the following is my gitlab-ci.yml:image: docker:stable stages: - test - build before-script: - apt install -y python-dev python pip test1: stage: test script: ... - pytest build: stage: build - docker build -t $IMAGE_TAG . - docker push $IMAGE_TAGbut i got a Job failed/bin/sh: eval: line : apt: not found ERROR: Job failed: exit code 127I also tried to apt-get install but the result is the same.How do I install python??
apt not found when I use apt in gitlab ci before_script
Somehow the issue was because of the missing cert chain. Received cert chain from the cert provider and used all 3 (key,cert body & cert chain) while uploading it on ACM and all worked fine.
I receive this error when I try to import a certificate on AWS ACM. Provided certificate is not a valid self signed. Please provide either a valid self-signed certificate or certificate chain. The certificated I have are initially in .pfx format and I use sslshopper: https://www.sslshopper.com/ssl-converter.html to convert them into pem. There is only certificate body and private key present in the converted pem format and no certficate chain. Can this be the reason of this error. But I thought cert chain is optional . The format of private key and cert body seems to be correct and is enclosed between ---Begin cert body/privateKey ---End cert body/privateKey What can be the issue here ? The cert body and the cert private key seems to be ok to me as it clearly shows me the name,expiry date etc once I paste the contents into the respective fields (please refer the green content in the attached screenshot.)
Provided certificate is not a valid self signed. Please provide either a valid self-signed certificate or certificate chain
The nginx: [error] invalid PID number " " in "/usr/local/var/run/nginx.pid" message most likely means that nginx is not started. Try to start it first by just typing nginx. To make sure nginx has started successfully, execute ps -ax | grep nginx. Output on my machine: MacBook-Pro-Aleksej:~ alexey$ nginx MacBook-Pro-Aleksej:~ alexey$ ps -ax | grep nginx 69982 ?? 0:00.00 nginx: master process nginx 69984 ?? 0:00.00 nginx: worker process 69995 ttys000 0:00.00 grep nginx
I tried to install nginx serve on mac os x by following below link, when i try to restart server gives me below error. How to install Nginx webserver on Mac OS X sudo nginx -s stop nginx: [error] invalid PID number " " in "/usr/local/var/run/nginx.pid"
I installed nginx server on mac os x. Now i try to restart it and get below error.
Make sure your.htaccessis being taken into consideration by Apache. Just put inside your.htaccess:# the following should issue a 500 error LoremipsumdolorSITAMETIf your website still works after you place the above gibberish, your.htaccessis not read by Apache. In that casecontact your AdminIf, on the other hand, you get a500 error(or any other, really) ask your Admin to allow flag setting in .htaccessShareFollowansweredMar 22, 2013 at 19:46Unamata SanataraiUnamata Sanatarai6,55733 gold badges3030 silver badges5151 bronze badgesAdd a comment|
How to hide all console errors in web page by using.htaccess?The code I'm currently using is not workingphp_flag display_errors off
How to hide all console errors
No. Self-issued means that the Issuer and Subject are the same and self-signed means a self-issued certificate whose contained public key can verify its own signature. (Some software and most humans ignore the signature check and just treat all self-issued as self-signed.)Note that all root authorities are self-signed, because the PKI trust system has to start somewhere.
The certificate's subject name and issuer name are different but the certificate authority used to create the certificate has the same issuer and name.Therefore since the certificate authority is self-signed, are the certificates it creates also considered self-signed?
Is a certificate considered self-signed if the Certificate Authority used to create it is self-signed?
1 I think you may want to double-check if you have set the base correctly. Check out the documentation site about deploy to GitHub pages and Config Reference -> base If this doesn't solve your problem, can you post more detail about your code? Or maybe a repo? Share Improve this answer Follow answered Feb 5, 2020 at 4:19 Sun HaoranSun Haoran 51611 gold badge55 silver badges1313 bronze badges 3 i can not post repo here it is private. the base is set correctly to the congfig directioins.. module.exports = { base: '/web-vagrant/', title: 'Web Vagrant', description: 'Web Vagrant Environment', – cyberAnn Feb 6, 2020 at 18:27 i can share more info about the code, what do you need? and also can i pm you instead? – cyberAnn Feb 6, 2020 at 18:30 Sun, I fixed it.... it was a base thing... but i had to take a closer look at the other titles. Thank you!!! – cyberAnn Feb 7, 2020 at 0:36 Add a comment  | 
I updated a pre-existing vuepress documentation, which runs and works as expected when delopyed on localhost:8080/, however once I push the updates to gh hub pages it does not display correctly. code i use to deploy: set -e npm run docs:build cd docs/.vuepress/dist git init git add -A git commit -m "Deploy documentation" git push-f [email protected]:NAME/REPO.git master:gh-pages I have no error messages durning run time or deploy. But when I check the actual documentation on github, it displays funny. and the links do not work.... as when I check the pages dev eniroment on the console 404 errors appear... it seems that there might be something wrong with the dist.js files in assets.... Not sure how to fix this...please help. Thx! Images 1: Displays black blocks Images 2 Error in the dev console (I have no errors messages durning build only in the console)
Vuepress not displaying documents correctly
i've asked a similar question about the technical debt pyramid, that show debt by charasteristic and here is the answer:sonarqube how to access to default technical debt pyramid values from web service api?i think that the only way to access to these information its using the payed plugin (sqale).
Is there a way to retrieve the characteristic of a metric of a project over time? For instance TESTABILITY is a characteristic of the metric "squale_index". Squale Index can be retrieved for each project using the /api/timemachine interface. However I could not find a reference to filter it in the api documentation. Is there another way?
Sonarqube timemachine API and metrics characteristics