Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
In this case you don't need to use capture list, because both closures areUIViewand not retained byself. The retain cycle is not created in your example.ShareFollowansweredApr 24, 2015 at 6:44KirsteinsKirsteins27.1k88 gold badges7777 silver badges7878 bronze badgesAdd a comment| | override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(netHex: 0xfc3158)
fadeBackground()
NSTimer.scheduledTimerWithTimeInterval(self.fadeTime, target: self, selector: Selector("fadeBackground"), userInfo: nil, repeats: true)
}
func fadeBackground(){
UIView.animateWit... | Do I need [unowned self] or [weak self] in this closure? |
The other answers failed, because they no not extract the container it from the task. Swarm wraps a task object around a container:taskid=$(docker service ps -q ${servicename} |head -1)
containerid=$(docker inspect -f '{{.Status.ContainerStatus.ContainerID}}' ${taskid})
docker exec -it ${containerid} "$*"Of course, thi... | I have a deployed docker stack on AWS with swarm:docker stack deploy --with-registry-auth -c docker-stack.yml pipelineI want to get an interactive bash session into one of the containers defined in thedocker-stack.yml, but the variousdocker exec -ti CONTAINER_NAME /bin/bashinvocations that I have tried all fail.What is... | How to docker exec -ti CONTAINER_NAME /bin/bash on deployed docker stack? |
I suggest you read the docs on the KubernetesServiceabstraction.Depending on the Cloud or your infrastructure provider this could be several thingsGenerally, this means that the kube-controller manager can't create the load balancer in your cloud provider and the kubelet on your nodes can't add the routes to the servic... | I have Kubernetes Cluster v1.10 over centos 7when I deploy service type LoadBalancer it still in pending statusDo I need to know how LoadBalancer type work? | Kubernetes's service still in pending status. How does it work and how to fix this issue? |
You won't find a REST endpoint for generating a presigned URL because that URL is generated entirely client-side. :) The python code used to generate those URLs can be found in thegenerate_presigned_urlmethod of thesigners.pyin thebotocorelibrary.You can verify the client-sidedness of the presigned-url generation in tw... | Is it possible to generate a presigned URL for an S3 object using the AWS REST API rather than the SDKs? I can't find the topic for this in the AWS REST API documentation. | AWS S3 - Generate presigned URL using REST API |
Downloading the zip remains the smallest archive you can download, since it does not include the full history of the repo.And that archive does weight 780MB...That being said, as described in "Download a single folder or directory from a GitHub repo", check if a service likeDownGitcan help. | How to Download Only A Particular folder from GitHub.I have a very slow Internet Connection and I am learning asp.net core.TheTutorialrequires code from this Link ->https://github.com/aspnet/Docs/tree/master/aspnetcore/fundamentals/logging/index/sample2So If I make a Git Pull Or Just Download therepoits a huge 800 Mb :... | Git Pull But Only A Directory Not the Entire Repo |
Try this work-around:Create a copy of the volume with the new name using the script:#!/bin/bash
#Author: Guido Diepen
#Convenience script that can help me to easily create a clone of a given
#data volume. The script is mainly useful if you are using named volumes
#First check if the user provided all needed argumen... | I want to rename a docker-compose project (i.e by renaming the directory or adding-p new_nameto docker-compose). If I do so I'll remove all my old containers and also all my old volumes. Is there a way to keep the volumes and attach them to the new docker-compose container?Exampledocker-compose.ymlversion: '3'
service... | Rename docker-compose project without deleting volumes |
After some experimenting I found out that using the namepostgresin the keycloak-deployment.yaml file- env:
- name: DB_ADDR
value: postgresmesses things up and results in a strange expansion. After replacing this part of the yaml file with:- env:
- name: DB_ADDR
value: postgres-keycloakmakes it work ... | I am trying to run KeyCloak on Kubernetes using PostgreSQL as a database.The files I am referring to are on thepeterzandbergen/keycloak-kubernetesproject on GitHub.I usedkomposeto generate theyamlfiles, as a staring point, using the files thatjbosspublished.PostgreSQL is started first using:./start-postgres.shThen I tr... | How can KeyCloak on Kubernetes connect to PostgreSQL? |
From the documentation about the settingfilesystem.ignore_types:A list of filesystem types to ignore. Metrics will not be collected from filesystems matching these types. This setting also affects the fsstats metricset.If this option is not set, metricbeat ignoresall types for virtual devices in systems where this info... | Let me explain the problem and context. This is a server for a database solution. The database was created with docker, and added a volume to the server. Then all docker installation path was moved to the volume added to the server (for security and backup mantain). Then for monitoring, i added a metricbeat agent to ca... | Metricbeat not show volume mount under dev filesystem |
You will have to use port forwarding to be able to access your docker container from the outside world.
From the Docker docs:
By default Docker containers can make connections to the outside world, but the outside world cannot connect to containers.
But if you want containers to accept incoming connections, you wil... |
I just started using docker and followed following tutorial: https://docs.docker.com/engine/admin/using_supervisord/
FROM ubuntu:14.04
RUN apt-get update && apt-get upgrade
RUN apt-get install -y openssh-server apache2 supervisor
RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor
COPY su... | How to use docker container as apache server? |
You're using capture group # 1 i.e.$1without using capturing a group using square brackets.Change your code to this:RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L] | I'm trying to disable HTTPS on domain names that do not have SSL certificates, I am using this code but it doesn't seem to be doing anything. My website is running Wordpress and the wordpress htaccess is working fine, but the HTTPS bit seems to be nothing. This is the code I am using with wordpress' htaccess:I'm now us... | htaccess to rewrite all HTTPS requests to HTTP version |
The way I managed to do it usingsecrets: inherit:In my Developer Settings created a PAT enabling access to repoBStored the PAT value as a Repository Secret called e.g. "GH_PAT_FOR_REPO_B" in RepoA Settings/SecretsIn calling workflow (under RepoA):jobs:
test:
uses: myorg/repoB/.github/workflows/test.yml@master
secrets: ... | I have a caller workflow in repoA that triggers a reusable workflow in repoB (same org):workflow in RepoA:jobs:
test:
uses: myorg/repoB/.github/workflows/test.yml@masterworkflow in RepoB:name: test
on:
workflow_call:
jobs:
test:
runs-on: [self-hosted]
steps:
- name: Git checkout
uses: action... | How to check out a reusable workflow's repo (in GitHub actions) |
You need remove anuragportfolio/anuragportfolio.github.io repo that include the cname.
|
I integrated a custom domain from namecheap.com but now when I am trying to do default github pages hosting this domain name is coming (anuragportfolio.me) in between the full domain name. Previously it was coming as https://anurag30112003.github.io/Portfolio.github.io/. How to remove it or restore to default?
| How to remove custom domain from github pages |
This is aknown bugin Docker.The fixwas merged on 8th June 2018, so should be in some future Docker release. | I'm runningdocker 17.12.0-ceunderubuntu 16.04 ServerAfter doingdocker exec -it ... bashthe terminal (putty) size change.Beforestty sizegives60 180after0 0So after entering the 80st character the next ones are placed at the begining of the line (not on the next line).There is a solution ? Something to configure in dock... | Docker terminal size |
You could try installing mod_rewrite and putting the following in your .htaccess or httpd.conf :RewriteEngine On
RewriteBase /something/
RewriteRule ^(url.com/dir/*)$ http://url.com:$1 [R=301,L]This is a 301 'permanent' redirect which would also change linked URLs in search engines to your final address. More informati... | I would like to have apache respond to server request of the format "http://url.com/dir/ID" by directly accessing "http://url.com/something:PORT", where the ID is set by the user, and the PORT is determined by the ID (they're not the same value).I have tried so with "Redirect", but this simply sends a HTTP redirect, my... | Redirecting contents not using HTTP |
just for code brief, change the first line fromconst columnsEventModal= Column[] = [...]
return columnsEventModal;to the linereturn [...]because you dont do anything in between insertion and return statement, Sonar doesnt understand why you would allocate a variable | After analyzing my code with SonarLint, I get the following smell code: "Local variables should not be declared and then immediately returned or thrown".Even if this is not blocking and the component works perfectly.I think there is a better way to post thereturnin the function but I don't see how, if anyone knows the ... | SonarLint : Code Smell : Local variables should not be declared and then immediately returned or thrown |
You can pretty much always assume that batching up work is good. If you can do the same thing in fewer draw calls, then do it. If you can make fewer state changes (texture/VBO swaps) then do it.To answer your questions, render one big texture, render one big mesh. | Sometimes ago I have made a following investigation:
Measuring a performance for drawing several textures. I have got the following result:2 textures 1920x720: ~ 2 mls1 texture 1920x720 + 2(960x720): ~2 mls1 texture 1920x720 + 2(960x720): ~2 mls1 texture 1920x720 + 4(960x360): ~2 mls + 0.09 mls1 texture 1920x720 + 3(96... | OpenGL ES - Drawing one big or multiple small textures. What is better for performance |
Watching or monitoring the cloud watch logs would be the best way to monitor if a lambda is running or not. These logs are not real time, but may be near real time enough for your needs. You could ask CloudWatch for the last X minutes of log for a particular lambda and monitor the timing of the log statements. As A... |
How can I check the running Lambda functions running using the aws cli?
It seems that there is no a command to check it:
aws lambda XXXX
I have several scripts running, and I'd like to monitor the situation.
It is enough to show how many functions are running.
Thank you
| Amazon Lambda list running functions |
You need to make the script part of the container. To do that, you need to copy the script inside using theCOPYcommand in the Docker file, e.g. like thisFROM ubuntu:14.04
COPY run_netcat_webserver.sh /some/path/run_netcat_webserver.sh
CMD /some/path/run_netcat_webserver.shThe/some/pathis a path of your choiceinsidethe ... | I'm trying to write a docker image to run a simple webserver though netcat.So I have in my docker build folder:Dockerfile
index.html
run_netcat_webserver.shTherun_netcat_webserver.shis very simple and it works fine:#!/bin/bash
while true ; do nc -l 8080 < index.html ; doneHere is my naive Dockerfile that of course is... | How do I write a dockerfile to execute a simple bash script? |
From the Play 2.2 Migration guide:
Play cache is now split out into its own module. If you are using the
Play cache, you will need to add this as a dependency. For example, in
Build.scala:
val addDependencies = Seq(
jdbc,
cache,
...
)
|
I'm new to play (v2.2.0), and I'm modifying the hello-play-java template. I'd like to add caching, however, the JavaCache documentation makes what appears to be conflicting statements:
The default implementation of the cache API uses EHCache and it’s enabled by default.
and
The cache API is provided by the play.ca... | Enabling ehcache in Play 2.2.x |
Because pre-signed S3 urls usesig4signatures and this requires region. Fromdocs:The signing key isscoped to a specific Regionand service, and it never expires.Also, fromCLI docs:For sigv4 requests theregion needsto be configured explicitly. | When I use the commandaws s3 presign s3://my_bucket/my_image.pngwithout specifying region I get an URL which redirects me to<Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message>Later, if I useaws s3 presign s3://my_bu... | Why in AWS CLI is required to specify region when using pre-signed URL? |
This is more from a general understanding of how memory works but:
If the resources haven't been disposed of, you can't use them because they are still being taken up. When resources are not disposed/garbage collected/freed they are not usable because there is something else using up that memory. However, once it goes... |
I'm trying to understand more about the dispose() function of AWT/Swing's Window class and what it does. Imagine the following series of events:
An instance A of a Window derivative X is garbage-collected after going out of scope. Dispose is not called prior to garbage collection.
A new instance of X, B is created ... | Can Java reuse non-disposed system GUI resources? |
No, you can specify tables to be locked using --lock-tables but they aren't by defaultIf you don't specify any tables then the whole DB is backed up, or you can specify a list of tables :mysqldump [options] db_name [tables]Not used it sorry, however I run a number of MySQL DBs, some bigger some smaller than 1.7gb and I... | I have a MySQL Database of about 1.7GB. I usually back it up using mysqldump and this takes about 2 minutes. However, I would like to know the answers to the following questions:Does mysqldump block read and/or write operations to the database? Because in a live scenario, I would not want to block users from using the ... | Backup MySQL database |
The remote origin url is specific for each project and only needs to be set once for each project. so on your development machine you have many projects, inside the root folder of each individual project you initialise a git repository using git init. This initialises a local git repository inside that root folder for... |
I want to have several repositories in my GitHub account connected with various Android Studio projects I am working right now. I have finished my first and I have pushed it to a repository in my GitHub account. But when I am trying to push another Android Studio project to a different repository (in that same GitHub ... | Multiple remotes for the same GitHub account |
From my experience, the way I do it is create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point.
This is my approach if I do not want any downtime(i.e. production server) because this solution only takes a s... |
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
... | How to safely upgrade an Amazon EC2 instance from t1.micro to large? [closed] |
This is a working config (Paths etc. needs adaption)daemonset:
extraEnvs:
- name: "ELASTICSEARCH_USERNAME"
valueFrom:
secretKeyRef:
name: elasticsearch-master-credentials
key: username
- name: "ELASTICSEARCH_PASSWORD"
valueFrom:
secretKeyRef:
name: ela... | I've installed elasticsearch 8.5 and Kibana 8.5 in my kubernetes cluster simply applying the official helm file in the elastic repo.
Now I'm trying to install filebeat with the following conf:filebeat.inputs:
- type: container
paths:
- "/var/log/app.log"
processors:
- add_kubernetes_metada... | Filebeat not sending data to elasticsearch |
To put it in simple terms IAM role is adocument, definition of who (your app, AWS service etc) can use what (list of API calls) under which conditions (list of service specific conditions, optional). Roles are managed byIAMservice.STS is AWSservicewhich is used for getting temporary credentials. If you want to assume r... | Iam new to AWS trying to understand the concepts,what is the difference between IAM Role and STS WHEN TO USE WHICH SERVICE from application.can anyone please explain | Application using Iam Role vs STS |
@GustavoFilgueiras The reason you are encountering an error is because the image php:7.4.11-apache that you are utilizing for your apache service does not come with git preinstalled. Also, based on your feedback, the following assumes you are attempting to connect to a private repo and the SSH key normally utilized is... |
I tried to do a clone via Git on my docker compose, but i'm just started using a docker and i don't know how can i do it.
I want to do a download inside de apache (document root) /var/www/html.
The line is: command: bash -c "git clone [email protected]:user/project.git"
version: '3.8'
services:
mysql:
image... | Docker Compose using with git clone |
So it's pretty annoying to set up, but here are two ways:Set up a regular Lambda integration and then add the InvocationType header described herehttp://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html. The value should be 'Event'.This is annoying because the console won't let you add headers when you have a Lambda... | I'm attempting to integrate my lambda function, which must run async because it takes too long, with API gateway. I believe I must, instead of choosing the "Lambda" integration type, choose "AWS Service" and specify Lambda. (e.g.thisandthisseem to imply that.)However, I get the message "AWS ARN for integration must con... | Api Gateway: AWS Subdomain for Lambda Integration |
Can you check your configurations as following link.https://docs.openshift.com/container-platform/3.9/dev_guide/integrating_external_services.html | I am deploying my spring boot application in Openshift and the same uses external mongodb cluster for which I have created Endpoints/Service Objects. In my application.properties file I am using service name and when I try to call some API I am getting below errorNo server chosen by WritableServerSelector from cluster ... | Openshift: Endpoints/Service for External MongoDB: Error No server chosen by WritableServerSelector from cluster description |
FromGitHub:We claim no intellectual property rights over the material you provide to the Service. Your profile and materials uploaded remain yours. However, by setting your pages to be viewed publicly, you agree to allow others to view your Content. By setting your repositories to be viewed publicly, you agree to allow... | Closed.This question isoff-topic. It is not currently accepting answers.Want to improve this question?Update the questionso it'son-topicfor Stack Overflow.Closed10 years ago.The community reviewed whether to reopen this question6 months agoand left it closed:Original close reason(s) were not resolvedImprove this questi... | Is proprietary code legally safe on bitbucket or github? [closed] |
TLDR: Try to use thecsrf_exemptdecorator for your view:from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def my_webhook(request):
# Do some stuffs...
# Return an HHTPResponse as Django expects a response from the view
return HttpResponse(status=200)You should only do this when absolutely n... | I have a website running, which appears to be working fine. Yet, now I've seen this error in the logs for the fist time.Forbidden (Referer checking failed - no Referer.): /pointlocations/
[pid: 4143|app: 0|req: 148/295] 104.176.70.209 () {48 vars in 1043 bytes} [Wed Jul 26 19:49:35 2017] POST /pointlocations/?participa... | What does error mean? : "Forbidden (Referer checking failed - no Referer.):" |
The only significant difference is that the older Mali cores (Mali-300/400 series) only support mediump in the fragment shader, so algorithms relying on highp precision won't work there.There are surely fine tuning differences, but hard to give a succinct answer to that one. Just focus on writing good clean GL and it s... | I am developing a framework using OpenGL ES to create 3D applications.
I need to deploy the framework in both PowerVR and Mali GPUs chip-sets.Is there any aspects to be taken care in programming OpenGL ES for different GPUs (PowerVR and Mali)? | Difference in opengl es programming for PowerVR and Mali GPU chipsets |
According to the Wikipedia,Extended Validation certificate is supported in:Safari for iOSWindows PhoneBlackberryOn my iPhone it is displayed in a way similar to desktop browsers:The only platform I couldn't find any information about current or planned support of EV certificates is Android.Answers to this question on s... | With the rise of mobile phone and tablet browsing I've noticed that there's no display of Extended Validation certificates. Just the same green padlock as a plain ol' $5 certificate.In a desktop browser, you have a lovely green bar, and a green box with the company name on it. This adds trust and confidence in the doma... | Extended Validation certificate, how do display the extended credentials on mobile devices? |
Use this code instead loading the video file to memory, Your code will work with small files but u gonna fail with big files.
if ( [[NSFileManager defaultManager] isReadableFileAtPath:source] ){
[[NSFileManager defaultManager] copyItemAtURL:source toURL:destination error:nil];}
|
I am working on a project where I need to manage videos. I need to rename or delete video. For that we need to hold the video in NSDATA and then manage it.
But I am getting an error message as Terminated due to memory error on below statement.
Edited
NSData *data=[NSData dataWithContentsOfFile:self.path];
if (data){
... | Terminated due to memory error iOS? |
I use this query:
avg_over_time(availability:max_uptime:percentage{service=~"$applications"}[$__range]) | Currently I am calculating uptime % using below query.But if I try to test by restarting a service that is if i restart at 11:00 and if i try to test at 11:05 it should show 100% availability , but in my case it is not showing that way.Please help out with correct calculation for uptime %Queryavg_over_time(up{instance... | How to calculate percentage of uptime using grafana and prometheus |
Several of the Dockerfile directives (notably ENTRYPOINT and CMD, but also EXPOSE, LABEL, and MAINTAINER) just set metadata in the image; they don't really do anything themselves. Within a single Dockerfile this will work just fine:
FROM ubuntu:18.04
WORKDIR /app
# Just remembers this in the image metadata; doesn't a... |
I have a very simple Dockerfile like the below :-
FROM my-base-image
COPY abc.properties /opt/conf/
Now my base-image has a docker entrypoint (at the end of its Dockerfile) but this resulting image as you can see has none. Does this work or do we need to have a docker entrypoint/CMD in any given Dockerfile. Also ... | Dockerfile with entrypoint only from base image |
The purpose of a database dump, or of any backup data, is to provide a snapshot of what the database looked like at a particular point in time so that if something catastrophic happens you can revert to that version of a database. If you make changes to the database and want a more up-to-date dump that reflects those ... |
Is there a way to update a mysqldump file?
Let's say I created a dump file for a table that archive the data over 3 month old and remove those archived records from the original records. And I want to update that same file every week with the new data that expires and retaining the old archived records. I know there a... | updating Mysqldump file |
TheSystem.Runtime.Caching.MemoryCacheonly works within a single process. Your best solution is to use a distributed cache (like Redis, Memcache, ...) with a single server (the server you are running your apps on).C# objects can't be directly passed across process spaces, so there is inevitably some sort of serializati... | I have multiple windows services running, which are on different processes, is the System.Runtime.Caching.MemoryCache common for these processes or is it separate instance for each process?If not, is there a caching mechanism that shares the same instance of cache namespace on .net in a server.I am not looking for dist... | System.Runtime.Caching.MemoryCache is it shared across processes in the same server |
You can try this awesome library from Packagist
composer install knplabs/github-api
https://packagist.org/packages/knplabs/github-api
<?php
require_once 'vendor/autoload.php';
$client = new \Github\Client();
$repositories = $client->api('user')->repositories('delboy1978uk');
|
I want to show all the public repositories of my Github account on my website. The website is created fully on laravel. Users can view my public repositories from my website without going to my github profile.
| How to show my public repositories of github, on my Website |
I believe the AWS docs have been improved since the question was raised, but maybe this also would be useful.A container in theprivileged modedoes not differ from any other running process with all the capabilities on the host machine. It undermines the whole idea of container isolation.
Privileged mode opens a possib... | When creating a Codebuild project it's possible to configure a cache in the Artifacts section to speed up subsequent builds.Docker layer cacheis one of the options there. AWS documentation says:LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large ... | AWS CodeBuild - Security Implications of Enabling Docker Layer Cache |
Recompile a kernel using ABS to get audit support.
You will need to addCONFIG_AUDIT=yin the config file beforemakepkg -s.P.S. Compilation might take very long. | I want to useaudit frameworkon my latest arch linux, but runningsudo auditctl -w /home/in console gives meError - audit support not in kernel
Cannot open netlink audit socketI tried to enable of course audit via kernel boot params setting audit flag:GRUB_CMDLINE_LINUX_DEFAULT="quiet audit=1"but nothing changes after r... | how to enable audit framework in arch linux 3.12 kernel? |
You can check your cached ssh keys withssh-add -l.You can delete all cached keys withssh-add -D. | I'm trying to ssh into github using a different private key than my original one. It seems like thesshrequest is somehow cached, because no matter what I do when I callssh -T[email protected], it saysHi [wrong-user] You've successfully authenticated...I've tried doing a variety of things:Removinggithub.useranduser.ema... | Change github user / private key |
There is a freehosted TFS servicefrom Microsoft that allows you to do automatic builds and deployments of your projects from TFS into Azure whenever check-ins occur in the TFS team project. It is really easy to setup, and takes about 10-15 minutes. It is currently in preview so it is free. I have ablog postand acomp... | is there a way to deploy to an azure webrole from source control.I dont mind too much which sc system I use, just want the deploy to occur on 'push' as in azure websites with git. | deploy web role to azure from source control |
Your instance is full! All the data is allocated in the xvda1 volume. Only 2GB is available to use for each instance and you are using 99% of this. As the df command clearly shows.To change the size of the volume go to EC2 page in the AWS console. Look for Elastic Block Store and modify the size of the volume. | Good evening guys! I don't understand why my C9 instance is says that is full. But my actual size is 437784 kb. When I type df I get:Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 4073856 64 4073792 1% /dev
tmpfs 4084416 0 4084416 0% /dev/shm
/dev/xvda1 8... | AWS C9 - Your environment is running out of quota. Please make some free space |
I figured it out, I added all 3 ports on Kubernetes now: 15672, 5672, 25672. And used only the IP as the RabbitMQConnectionString. It then automatically uses 5672 port to send & receive messages. | When I use RabbitMQ from localhost, I supply my RabbitMQConnectionString aslocalhostin my ASP.NET Core WebApi and everything works fine.But I wanted to use RabbitMQ from a Kubernetes Cluster, so, I created a new Namespace in Kubernetes Cluster for RabbitMQ, then I created an app from the Kubernetes Dashboard with the i... | Kubernetes: RabbitMQ Client could not connect. (None of the specified endpoints were reachable) |
A force push is the only way to remove commits. However you can create a new commit that undoes what what changed in previous commits usinggit revert.In your case, to undo the changes from commitsdande, you would dogit revert d eThen you just need to commit the changes and push to origin.ShareFollowansweredJul 15, 2018... | I need to reset theorigin/branchto 2 commits back:a---b---c[head]---d---e[origin/branch]toa---b---c[head, origin/branch]HoweverI can't force push to this branchas it is protected on github.What is the procedure to basically erase the last two commits from remote (github)? | Remove commits from remote without force pushing |
With out looking at your program it's impossible to say what the problem is. Are you keeping results of queries you run against the database in memory? If your program is written in such a way that you have multiple large JDBC result sets and the garbage collector can't determine weather it's safe to free the memory th... | I use SQLite in a java program. While the java program runs, several queries are sent to the database as well as temporary tables are created in memory and then deleted (using DROP).The problem is that while the number of various operations in the database increases, the memory usage from the java program also increase... | SQLite java memory usage increases until an outofmemory exception |
Elastic Load Balancer cannot be configured to filter out requests.If your allowed connections are based on IP address, then you can use VPC ACLs to allow only connections from certain IP addresses. All others will receive failed connections at the ELB level.If your allowed connections are not based on IP address you ca... | I have a Django app deployed on AWS Elastic Beanstalk. Django is configured to only serve requests that comes for a specific hostname (ALLOWED_HOSTS). If the host information in the request doesn't match, it will raise return 500 response code, that is fine.But, I have noticed that I get quite many of those, either sen... | Can AWS Load Balancer be configured to filter out requests? |
This is an artifact of using the DocumentClient - StringSet is not a JSON type.
The DocumentClient converts a StringSet to the Array native JavaScript type:
https://github.com/aws/aws-sdk-js/blob/master/lib/dynamodb/converter.js#L61. Then the client serializes the native JavaScript Array as a DynamoDB List type: https... |
I have created a attribute of type String Set.
When I create the Item and assign an attribute of type SS everything works.
But when I try to update this attribute, the data type changes to a list ("L").
I try this:
qw = new AWS.DynamoDB.DocumentClient();
var params = {
TableName : "myTable",
Key: {
"id": some... | How to update an item in Dynamodb of type String Set (SS)? |
You can comment lines by using the # character, e.g.
[default]
aws_access_key_id = XXXXXXXXX
aws_secret_access_key = YYYYYYYY
#[qa]
#aws_access_key_id = AAAAAAAAA
#aws_secret_access_key = BBBBBB
|
For AWS CLI configuration and credentials files how do you comment out lines in these files - I checked the documentation here http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files but found nothing.
e.g.
~/.aws/credentials
[default]
aws_access_key_id = XXXXXXXXX
aws_secret_acc... | How do you comment out lines in AWS CLI config and credentials files? |
I found one half solution workaround:Under 'Custom metadata' in the instance settings, I entered this key and value:startup-script
#! /bin/bash
echo "starting"
docker start thirsty_lehmann | I have a Docker Container that automatically restarts when the GCE VM instance is reset. That is good, but any changes to it are not permanent. If I commit the container using the base image repository and tag name, a new image is created with those labels and the base image loses its tag which goes to . Which would st... | GCP: GCE: COS: Docker: Change which container is automatically started? |
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^([0-9]{6})$ scriptname.php?no=$1 [L]
</IfModule>To preserve the clean URLhttp://mywebsite.com/132483while serving scriptname.php use only [L].
Using [R=301] will redirect you to your scriptname.php?no=xxxYou may find this usefulhttp://www.addedbytes.com/downlo... | Is it possible to use .htaccess to process all six digit URLs by sending them to a script, but handle every other invalid URL as an error 404?For example:http://mywebsite.com/132483would be sent to:http://mywebsite.com/scriptname.php?no=132483buthttp://mywebsite.com/132483a or
http://mywebsite.com/asdfwould be handled ... | Is it possible to use .htaccess to send six digit number URLs to a script but handle all other invalid URLs as 404s? |
I don't think you idea would work well with Kubernetes. Firstly, there so no way of "pausing" a Deployment or any other ReplicationController or ReplicaSet, besides setting thereplicasto0, as you mentioned.The next issue is, that the YAML you would get from the apiserver isn't the same as you created. The controller ma... | (I am (all things considered) a Kubernetes rookie.)I know thatkubectl create -f myDeployment.yamlwill send my deployment specification off to the cluster to be reified, and if it says to start three replicas of its contained pod template then Kubernetes will set about starting up three pods.I wonder: is there a Kuberne... | Is there the concept of uploading a Deployment without causing pods to start? |
Yes, it's possible. But first read,"What happens when I change my username?"To change your username, click your profile picture in the top right corner, then clickSettings. On the left side, clickAccount. Then clickChange username.
See the pictures below:SettingsChange usernameConfirm changing usernameType the new user... | I want to change my account's user name on GitHub, but I can't find how to do it. Is this possible at all? To clarify, I'm not talking about the user.name parameter in a git repository, but the username of the actual GitHub account. | Change GitHub Account username |
This sounds likepremature optimisation. In the first instance, we should worry about correctness and readability, and focus on performance only when there's direct evidence -- usually obtained through profiling -- that the code in question is a performance bottleneck.With this in mind, I would writepublic Heap() {
... | I know this might be stupid question, but i am wondering when is the right time to useif/elsestatement.Let's say we are constructing a heap by giving maximum heap size in primitive java int type.
And this is my constructor.public Heap(int maximumSize) {
this.maximumSize = maximumSize;
if (maximumSize < ... | Use of If/Else Statement in Java considering memory IO |
Artifacts are more difficult to aggregate than parameters.Parameters are always text and are generally small. This makes it easy for Argo Workflows to aggregate them into a single JSON object which can then be consumed by a "reduce" step.Artifacts, on the other hand, may be any type or size. So Argo Workflows is limite... | I have an Argo workflow with dynamic fan-out tasks that do some map operation (in a Map-Reduce meaning context). I want to create a reducer that aggregates their results. It's possible to do that when the outputs of each mapper are small and can be put as an output parameter. Seethis SO question-answerfor the descripti... | Dynamic "Fan-In" for artifact outputs in Argo? |
A few preliminaries:
I don't know if throwing an exception without exception handling enabled is undefined behavior or not by the standard, but you are certainly not going to get stack unwinding/destructor calls from your objects on the stack.
If you are writing C++ style code using RAII for mutexes, files, memory, e... |
I'm working on a performance-critical dynamically-linked library (DLL) that should also have a relatively small binary size. Since it doesn't explicitly throw any exceptions, I'd like to disable exception support altogether. However, there's one exception (pun unintended): when running out of memory (OOM), I have to r... | How to ensure out-of-memory robustness with C++ exceptions disabled (VS2010)? |
If I wanted to implement this (which is difficult to imagine, because I find it hard to believe it's the right solution to any problem :^), I'd try to do it by using a boost::pool_allocator (which provides a standard library compatible Allocator from a pool) and then - I forget the details; think it'll involve the Req... |
Has anyone seen an allocator that calls mlock(2) to prevent an STL container's contents from being swapped to disk?
There is afaik only one tricky part to writing such an allocator, namely minimizing the number of mlocked pages by clustering allocations to be mlocked. Ergo, one should probably start by modifying som... | Is there a C++ allocator that prevent an STL container from being swapped? |
<div class="s-prose js-post-body" itemprop="text">
<p>Docker made a huge refactor of the registry: registry v2.0.</p>
<p>With this brand new version, comes a new authentication system so the basic auth of v1.0 will not work anymore.</p>
<p>You can find more details about the v2.0 auth here: <a href="https://docs.docker... | <div class="s-prose js-post-body" itemprop="text">
<p>I would like to list the tags of a Docker image official Docker hub through its HTTP interface, but I am a bit confused. As there seems to two versions of them:</p>
<ul>
<li><a href="https://docs.docker.com/v1.6/reference/api/registry_api/" rel="nofollow noreferrer"... | Listing the tags of a Docker image on a Docker hub through the HTTP API |
0
Current answer from IBM support: IBM do not support these directives and are looking to add these capabilities in the future... no ETA provided by IBM.
Update: we have been told that IBM has added this capability and asked me to test out... busy trying to get it working.... |
Hi we need to increase the proxy_buffer_size and related parameters on an IBM Kubernetes implementation for the Ingress/NGINX
INgress/NGINX is throwing us a error upstream sent too big header while reading response header from upstream, client
The app we're running is Meteor based which is known for creating large hea... | How do you add custom NGINX (Ingress) snippets for proxy buffering params in IBM Bluemix/Kubernetes? |
You're correct that an image pulled by digest is effectively (!) unchangeable.The image digest is a SHA-256 hash computed from the layers that constitute the image. As a result it's highly improbable that a different image would share the same digest.Once created an image's layers don't change. So even if theFROMimage ... | Take for example the following repository hosted on dockerhub:https://hub.docker.com/r/frolvlad/alpine-miniconda3The following command is executed to pull an image via digest:docker pull frolvlad/alpine-miniconda3:python3.7@sha256:9bc9c096713a6e47ca1b4a0d354ea3f2a1f67669c9a2456352d28481a6ce2fbeBased off of thedocker do... | Docker: Pulling an image by digest, that internally uses a tag |
SonarLint doesn't care about how issues are marked in SonarQube serverIn connected mode, SonarLint will hide issues marked as false positive/won't fix on your SonarQube server.hoping for a "Quick Fix" Option that will add @SuppressWarningsEven if this is a supported feature, this is not something we want to promote. Mo... | for an existing code base I want to add @SuppressWarnings("squid:xxx") for certain squids so that both goals "don't touch a running system" as well as "make sure no now issues creep in for new code" are satisfied.I know that it is possible to mark issues as "Won't fix" in SonarQube server, however I prefer to have as m... | SonarLint|SonarQube - Batch Create @SuppressWarnings |
I think in that way you can't start the job immediately. The cron-expression triggers each 0 or 5 minutes.Alternative you could instantiate the job additionally and execute it manually in the contextInitialized(), if you dont need the JobExecutionContext.MyServiceProcessor mjob = new MyServiceProcessor();
mjob.execute(... | I am working on writing a Job when my application is deployed. This Job should run every 5 mins and it should start immediately. But the problem is it is starting 5 mins after the deployment and repeating for every five minutes. Please help me with the changes required to start it immediately when the application is d... | Schedule a Cron Job to start immediately when web application is deployed |
I had similar issues because my site was using HTTPS and Disqus was being served over HTTP.I couldjekyll serveand see the comments locally, but the comments did not show up on the live site. After a bit of searching and diffing I opened the Chrome Web Inspector and saw a series of errors like the two examples below:[bl... | I'm trying to add comments to my github page blog, and nothing happens when I add the code. No matter where I paste it. I've tried three different approaches so far:Per theJB installation documentation, I specified "disqus" as the provider and added my disqus short_name in my _config.yml file. That actually should have... | Can't get Disqus commenting to work on Github Page Blog |
I found a possible solution editing the docker-compose.yml file as follows:
version: '3'
services:
cm04:
image: tnc530_cm04
networks:
- test
privileged: false
restart: always
build:
context: C:/ProgramData/Docker/volumes/adontec/LSV2_Lib/Heidenhain/TNC530
dockerfile: Dockerfile... |
I'm using docker for windows (Version 18.03.0-ce-win59 (16762)) in a windows 10 pro. All the containers run ok after running the command docker-compose -up -d. The problem is when I restart the docker service. Then, once restarted, all the containers are stoped and when I run the command docker-compose start -d the fo... | Docker compose can not start service network not found after restart docker |
Update the READMEIsn't that what it is there for?In the commit message, have the summary line summarise that fact, and then write whatever detailed message you would like to convey there as well.Programmatically, you can write a Deprecated mechanism that warns that this project is no longer being maintained. And where... | Three months ago I forked a github repository for a rubygem and added some features. A fair number of people configured their Rails app to load that gem from my github repository. Yesterday the author merged my work and released a new gem.I would like to notify people who are continuing to pull from my github repo th... | Best way to let users know that your Github fork is no longer maintained (ie. it's been merged)? |
Just checkout that branch first and commit to itgit checkout -b mynewbranch
# `git add` what you need
git commit -m "my commit message" | I usually create branches for the different segments of code but once in a while I forget to create a new branch and everything is happening on the master branch.How can I say to git that although I am on the master branch, this commit is for thexyzbranch? | From master, commit to another branch |
Seethis page. I believe duplicity uses rsync type mechanism, so you cannot simply grab the directory and go - see the page of that page about rsync. If you need to do a file system level backup, while online, then you'll need some sort of atomicity like snapshots.Most likely, the backup simply wouldn't work.Postgres ... | I need to back up my database but I don't have enough disk space to dump it. Can I just use duplicity to perform incremental backups on the data directory? Would that corrupt the backup somehow? I don't mind a few of the latest rows missing, but I would like my backup to not be destroyed.Does anyone know what the case ... | Can I just backup postgres's directory while it's running? |
There are various ways,otherthan API Gateway, to invoke Lambda functions. The one most relevant to your use case would be theInvokeAPI. You can find the official documentationhereand the Boto library's, in case you are using Boto,here.Also, as mentioned in a comment on the question, you can assign an IAM role to the EC... | I am struggling with understanding how I can easily invoke my lambda function from an EC2 instance within a VPC.I think I have a quite common problem but strangely enough I didn't found anything specific for this "pattern".I have a Python application in an EC2 instance and I would like to launch heavy processing functi... | How to allow invoking an AWS Lambda function only from EC2 instances inside a VPC |
You can use "Type: 'AWS::DynamoDB::GlobalTable'" to create global table in CFN. A good resource ishttps://www.capitalone.com/tech/cloud/dynamodb-global-tables-with-cloudformation/.This feature was released on May 17, 2021,https://aws.amazon.com/about-aws/whats-new/2021/05/amazon-dynamodb-global-tables-now-support-aws-c... | Is it possible to create DynamoDB global tables using the CloudFormation template? I was looking at this AWS doc -http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.tutorial.html#creategt_cliand it seems like one can create DynamoDB global tables only with the Console or the AWS CLI and not th... | DynamoDB global tables using CloudFormation |
5
The aws-sdk does not contain the types for lambda. So you will need both aws-sdk and @types/aws-lambda unfortunately. Also I would suggest to declare the @types/aws-lambda in the devDependencies of your package.json.
import * as AWS from "aws-sdk";
import { Context } fr... |
I am building a typescript project on aws lambda. As aws-sdk comes with type definitions already I would expect it also to hold a definition for aws lambda. But I seem to have to install @types/aws-lambda separately for it to work.
//import { Lambda } from "aws-sdk";
import { Context } from "aws-lambda";
module.expor... | How do you elegantly import AWS - Lambda in Typescript? |
The OAuth2 callback does not have to be to Kinvey. If the user is interacting with the system and authorizing the token via OAuth, the redirect should actually be back to your web server - this way the user is redirected away from the authorization page, and back to your site. From there, you can get the token from t... | I am making an app that usesKinveyas a backend. I want to access the Github api. I need the user to authenticate with OAuth. Can I do that with Business Logic? As far as I can tell, every request needs to be authenticated as a user, whenGithub redirectsto my Business logic it won't have those credentials. I feel like I... | Kinvey Github API |
start by creating a dictionary where each key is a volume id
import dateutil.parser as p
d = {}
for snapshot in snapshots:
snapshot["created_at"] = p.parse(snapshot["created_at"])
try:
d[snapshot["volume_id"]].append(snapshot)
except KeyError:
d[snapshot["volume_id"]]=[snapshot]
now you should... |
I have the code below which looks for 2 keys and deletes the old one. That means I only have one data-retention
def delete_old_snap(self, volumeid):
list_snap = self.snapshots()
def doubles(l):
keys = [i["volume_id"] for i in l if i["volume_id"] == volumeid]
keys = {k for k in keys if keys.co... | keep n retention and delete old one |
2
You could do this quite cleanly by using Git directly: Keep a local clone of the repository, then run git pull to get the latest updates. A command like git fetch; git status could tell you beforehand whether you're out of sync or not. Git is optimized for pulling down up... |
I'm making a Python program that visualizes Covid vaccination data on a world map using Our World In Data's vaccination data in .json format. I'd like to introduce a feature where the program downloads the latest .json file from OWID's Github and replaces the old one, provided that there is at least a 24 hour differen... | Downloading only a file's "differences" using Git & Github? |
There's nothing wrong with your code. And it does clone the repository as you can see when you show the content of your directory. Just append these two lines to your Dockerfile:RUN ls -al /var/www
RUN ls -al /var/www/TweeboParserThe first line should produce this output:Step 6 : RUN ls -al /var/www
---> Running in 3f... | I'm new to Docker and want to git clone a public repository via HTTPS from GitHub in the Dockerfile. So far I've managed to install a few packages but I'm stuck at cloning a repository.My Dockerfile looks like this:FROM pasmod/miniconder2
RUN apt-get update && \
apt-get install -y build-essential libxml2-dev libxs... | Git clone via HTTPS not working in Docker makefile |
It looks like your application uses a lot of high-res bitmap (the bitmap memory partition is 19677KB). The sie of 'heap' and 'allocated' are quite normal, and should not be of any problem. Make sure that you remove unused bitmap from memory. You can free a bitmap from memory by callingbitmap.recycle(), or setting the r... | I'm tring to get image from gallery (by intent).I got this error:985120-byte external allocation too large for this process.
Out of memory: Heap Size=4871KB, Allocated=2472KB, Bitmap Size=19677KB
VM won't let us allocate 985120 bytesThat's my code where I get image:protected void onActivityResult(int requestCode, int r... | Bitmap out of memory |
Please try this.
SELECT * FROM pg_database;
|
I want to list out all the existing databases within a Redshift cluster. How can I do that.
What SQL query can I fire such that it sends me a list of all the databases within the AWS cluster
| How to find the list of databases within an AWS Redshift cluster |
The push dokku master will push to hte remote doku, the one you have added withgit remote add dokku[email protected]:ruby-rails-sampleSo the fact that you are or are not connected to GitHub is not relevant.You need to make suressh -T dokku.meis working.That supposes of course you have replaced dokku.me by the name of y... | I'm new to Dokku, where I am using it in conjunction with a DigitalOcean droplet.I'm following thistutorial.My problem is that when I go to push my git repository from Github to dokku, I receive this message:.git > git push -vvv dokku master
Pushing to[email protected]:my-rails-app
ssh: connect to host dokku.me port 22... | How do I push my git repository to dokku? |
<div class="s-prose js-post-body" itemprop="text">
<p>how about write a rails app as the proxy?</p>
</div> | <div class="s-prose js-post-body" itemprop="text">
<p>I need to run 2 identical Rails apps (different only in the underlying database) behind the same domain (e.g. mydomain.com) and have Nginx route requests to RailsApp1 or RailsApp2 depending on the existence of a cookie in the request. </p>
<p>How can I do this?</p>
... | How do I run two rails apps behind the same domain and have nginx route requests based on cookie? |
Cherry-pick will apply the delta of the source commit to the target branch, which is recorded as a new commit on the target branch. You should be able to safely delete the source branch after successful cherry-pick(as it requires your working tree to be clean).See the description of 'git cherry-pick' in the documentati... | I cherry-picked a commit from a branch that I no longer want.Is it bad form / will there be any issues if I have cherry-picked a commit that will no longer exist after I delete the branch? | Can I Remove the Branch that I have Git Cherry Picked From |
You can use ateeand then write it to a file which you use later:tempfile="xyz"
tr ' ' '\n' < "${!#}" | grep '.' | tee > "$tempfile" | sort | uniq -c ...
nol=$(wc -l "$tempfile")Or you can use it the other way around:nol=$(tr ' ' '\n' < "${!#}" | grep '.' \
| tee >(sort | uniq -c ... > /dev/tty) | wc -l | I have a big txt file which I want to edit in pipeline. But on same place in pipeline I want to set number of lines in variable $nol. I just want to see sintax how could I set variable in pipeline like:cat ${!#} | tr ' ' '\n'| grep . ; $nol=wc -l | sort | uniq -c ...That after second pipe is very wrong, but how can I d... | Is it possible to set variable in pipeline? |
# If the URI is not .htm and doesn't have any additonal params, try .htm
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(?![^/]+\.htm)([^/]+)$ $1.htm [L,R=302]
# Adding the R flag causes the URI to be rewritten in the browser rather than just internally
# If the URI is .htm but it... | When a page is accessed via an URL like this:/pagenameHow can we check if the following file exists via htaccess/pagename.htmAnd then load index.php if not?Here's what I'm working with:RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
R... | .htaccess How to check if URI + file extension doesn't exists before RewriteRule |
gh gist edit calls gh config editor and then find the match path in the Environment variable base on the command. For example, when you set gh config set editor "code -w", scripts will find the path in environment variable base on the above command. So I assume you are using Microsoft VS Code path, gh gist edit actual... |
I am using GitHub CLI, when I run gh gist edit <ID>, it gives me this error:
D:\lucas\Documents\Project\fork>gh gist edit 5366f5ac54b02086538313aa8133f660
'D:\lucas\AppData\Local\Programs\Microsoft' is not recognized as an internal or external,
command, operable program or batch file.
exit status 1
I don't know wh... | AppData\Local\Programs\Microsoft' is not recognized as an internal or external command |
3
The problem is that AWS only supports the 5 digit notation as opposed to the 6 digit notation in your example.
The AWS official blog announcement links directly to the Wikipedia page for cron which has the 5 digit notation at the top.
Your schedule corrected:
30 7 ? * ... |
I need to have a different auto-scaling policy for weekdays vs weekend.
So far I figured out how to set up the same policy for every day. The cmd call and the CRON string look like that:
as-put-scheduled-update-group-action TNUPWN --auto-scaling-group TNASG --region us-west-2 --recurrence "30 18 * * *" --desired-ca... | Is it possible to set up Amazon EC2 auto-scaling for particular days of the week? |
http://develop.github.com/p/commits.html
The commit tells you its tree sha.
[EDIT]
If you want the tree sha of a subfolder cd into the parent folder of the one you're interested in and run:
git ls-tree HEAD
If you want Root tree sha:
git show HEAD --format=raw
1st line has commit sha
2nd line has tree sha
|
How do I get the Root :tree_sha of a GitHub repository via the GitHub API?
The GitHib API help pages don't seem to explain this critical piece of information:
http://develop.github.com/p/object.html
Can get the contents of a tree by tree
SHA
tree/show/:user/:repo/:tree_sha
To get a listing of the root tree for
th... | GitHub Api: How to get Root :tree_sha of a repository? |
The proper way would be to use relative links in your HTML, it's unreliable to try to track the referer and rewrite every subsequent request to shove the /clientname/ back in as a prefix. | I'm setting up a clients area so my customers can review their site during development. I want to set it up so the URL ishttp://clients.mydomain.com/clientname/Is there a way in the .htaccess file to set that as the base URL? I'm using the leading / format for my URLs in the page (ie /about/ or /css/), which will is fi... | Set Base URL using .htaccess |
GitHub strips away<iframe>(for security reasons I guess) so you won't be able to embed a YouTube video in your README.As a workaround you can do the following:ifdef::env-github[]
image:https://img.youtube.com/vi/rAteGra5-xM/maxresdefault.jpg[link=https://youtu.be/rAteGra5-xM]
endif::[]
ifndef::env-github[]
video::rAte... | I'm writing documentation using the asciidoc markup language and pushing it to a github repo. Github renders asciidoc files (*.adoc) automatically but does for (me) unknown reasons not want to accept my embedding of a youtube video.I've tried the recommended way from the asciidoc writer's guide (e.g.)video::rAteGra5-xM... | AsciiDoc: How to embed youtube videos in github-flavored asciidoc? |
<div class="s-prose js-post-body" itemprop="text">
<p>When you use both entrypoint and command, the command section will be appended to entrypoint executable as arguments. Thus in your case:</p>
<pre><code>ENTRYPOINT ["/start.sh"]
CMD ["aptly", "api", "serve"]
</code></pre>
<p>Is equivalent to running:</p>
<pre><code>E... | <div class="s-prose js-post-body" itemprop="text">
<p>I try to setup a Docker with both entrypoint and cmd.</p>
<pre><code>FROM debian:stretch
RUN apt-get update && \
apt install gnupg ca-certificates -y
RUN echo "deb http://repo.aptly.info/ squeeze main" > /etc/apt/sources.list.d/aptly.list
RUN apt-key adv... | Docker entrypoint and cmd together |
The configuration forsecretRequiredisn't the only thing that changed:Fromhttps://tomcat.apache.org/migration-85.html#Upgrading_8.5.xIn 8.5.51 onwards, the default listen address of the AJP Connector was changed to the loopback address rather than all addresses.In 8.5.51 onwards, the requiredSecret attribute of the AJP ... | This works with Tomcat8.5.50. However, with Tomcat8.5.51, Apache cannot connect via AJP with the following error:[Tue Mar 10 20:15:31.378937 2020] [proxy:error] [pid 42:tid 139841308157696] (111)Connection refused: AH00957: AJP: attempt to connect to 172.28.0.5:8009 (tomcatserver) failed
[Tue Mar 10 20:15:31.379336 202... | (111)Connection refused - Apache Reverse Proxy and Tomcat 8.5.51 - Docker Compose |
create-stack can only be used when you know you want to create a new stack. If you want to update a stack, you have to use a different command, etc. If you're writing (ug) batch files to help run your cloudformation, this can be a real pain.
The deploy is functionality to better take advantage of change sets - rather... |
Can someone clearly explain to me difference and precedence between AWS CLI Cloudformation create-stack and deploy commands? For me it seems like they do same thing and deploy resources.
Why when you run the deploy command from the cli, the create stack has no executable change set, while the documenation says :
Depl... | AWS CloudFormation create-stack vs deploy |
You need atlassian sdk docker. There is no official sdk image from atlassian. You can create your own or to search the web for the 3rd party images. e.ghttps://hub.docker.com/r/codeclou/docker-atlassian-sdk | So we have a jira plugin under development that needs be manually tested on various jira versions. Usingatlas-debugfor this is aPAINand I'd much rather be able to pull down a docker image, do my testing on it, then discard the container again.Based onthis answer, my approach isstart_jira.shecho "Reading versions..."
J... | How can I run jira in dev mode as a docker container? |
If you are using docker-machine, see "Port forwarding in docker-machine?"either port forward the 5000 port on the VirtualBox level (meaninglocalhost:5000will work)VBoxManage controlvm "boot2docker-vm" natpf1 "tcp-port5000,tcp,,5000,,5000";or use the ip returned by$(docker-machine ip <yourMachine>) | On a mac system, I start the register following thedeploy document:docker run -d -p 5000:5000 --restart=always --name registry registry:2And its ip is"IPAddress": "172.17.0.2", which is from the commanddocker inspect <cid>But I can't telnet its port:$ telnet 172.17.0.2 5000
Trying 172.17.0.2...
telnet: connect to addre... | Can't visit `http://172.17.0.2:5000` after starting docker registry |
You will have to specify 2 more variables inside your docker-compose file under the phpmyadmin service:
environment:
PMA_HOST: mysql
PMA_PORT: 3306
Because even though you have created the link between your phpmyadmin and mysql containers, the phpmyadmin container will look for a database on 'localhost'
|
Hello im trying to connect mysql to my phpmyadmin container how can i bind the mysql to this. is it also possible to change the port 8080 to /phpmyadmin im access to http://192.168.99.100:8080 so i get http://192.168.99.100/phpmyadmin instead of the container id
version: '2'
services:
############################... | Docker connect phpmyadmin to my MySQL Server |
No there is no way to do that by default as such. But you can use a workaround if you would likeservices:
my-app:
image: <image>
volumes:
- ./scripts:/scripts
command: bash -c "ln -s /scripts scripts && orignal command"But this will require you to know the command before hand. So... | How can I map a volume using the Image WORKDIR in docker-compose?I'm trying to useservices:
my-app:
image: <image>
volumes:
- ./scripts:./scriptsBut when I try to executedocker-compose up -d, I get the error bellow:Cannot create container for service my-app: invalid volume spec "scripts"... | Mapping volume related with WORKDIR |
Istio announced thatversion 1.0 is production-ready. Here are some links about the design/architectural decisions to deploy istio in production:Benchmarking istio in productionIstio best practicesIstio deployment modelsPerformance and scalability in productionIstio feature statusabout alpha/beta/stable or production-re... | This is more of a design architectural decision to rollout Istio Service Mesh solution into Production. What are the key design decisions to make in this regard. What were the learnings/outcomes after rolling out into Prod. We are considering using Istio Operator as the way to go which would reconcile the state of the ... | Istio Service Mesh rollout into Prod (Design / Architectural decisions) |
1
I finally solved my problem, replacing the equivalent of the line command=bash /usr/bin/dotnet /var/aspnetcore/HelloMVC/HelloMVC.dll as described in https://docs.asp.net/en/latest/publishing/linuxproduction.html under "Configuring Supervisor" by a little script, far from... |
I am not sure if this is the right place to ask, but here it is: I created an ASP.NET Core web application, and copied all the files on my Ubuntu 14.04 server. I can compile and run without a problem, but now I want this application/web site to run permanently.
I followed all the steps described here https://docs.asp.... | Asp.Net Core - Error cannot execute binary file on published (Ubuntu 14.04) web application with supervisor |
nginx, like all well-behaved programs, can be configured not to self-daemonize.Use thedaemon offconfiguration directive described inhttp://wiki.nginx.org/CoreModule. | I have Nginx installed on a Docker container, and am trying to run it like this:docker run -i -t -p 80:80 mydockerimage /usr/sbin/nginxThe problem is that the way Nginx works, is that the initial process immediately spawns a master Nginx process and some workers, and then quits. Since Docker is only watching the PID of... | How to run Nginx within a Docker container without halting? |
there is no need top use BOTH cmd and entrypoint commands.in my projects I create a small bash script that the java command is written inside.that small script is running in my entry-point without any cmd configured.ShareFollowansweredJan 14, 2019 at 18:41eran meirieran meiri1,40233 gold badges1515 silver badges2929 br... | I am trying to deploy and run the java application in kubernetes POD for which I am getting below error.
But when I run it as a docker container it is running fine.Here is the Dockerfile -FROM openjdk:8-jre-alpine
ENV artifact mysessionmanager-1.0.0-SNAPSHOT.jar
WORKDIR /root/apps
COPY . /root/apps
EXPOSE 8080
ENTRYPO... | Running java app in kubernetes container is not working |
This is happening most likely because your passenger user does not have permissions to run your application or your application itself is not starting up properly. | I have rvm, passenger, ruby 1.9.3, nginx but I now get this errorCannot spawn application '/path/to/my/app': Could not read from the spawn server: Connection reset by peer (104)I havepassenger_rootset to the output ofpassenger-config --rootandruby-1.9.3-p125forpassenger_rubyI did have to dorvmsudo passenger-install-ngi... | Cannot spawn application |
A client certificate is used to identify a specific client. Usually you have multiple clients and each of them got their own certificate from your CA. While you could give the server all client certificates you ever generated (I don't know if this is possible with apache), it is much easier to give the server just the ... | I'm reading tutorialhttp://www.impetus.us/~rjmooney/projects/misc/clientcertauth.htmlThere is a part "Install the CA Certificate on the Web Server":<VirtualHost _default_:443>
...
SSLCACertificateFile /var/www/conf/ssl.crt/ca.crt
...
</VirtualHost>I wonder why I have to add on www server CA certificate and not generat... | Two-way SSL authentication with Apache - CA certificate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.