Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Aeron can be monitored and inspected using the following tools:https://github.com/real-logic/aeron/wiki/Monitoring-and-Debugging | I'm looking for a solution to log all requests/errors in a log file to parse logs with ELK
Is there any best practice or sample? or what's the Aeron recommendation for this requirement? | Logging In the Aeron |
svnadmin dumpdumps to standard out by defaultand the7zcommand line can read from standard input using the-siswitch.svnadmin dump c:\path\to\myrepo | 7z a -si svndump.7z | I need to get a backup dump of a large (~8gb) svn repository. My current method involves usingsvnadmin dumpto a file and then using 7-Zip to compress and split the file.> svnadmin dump c:\path\to\myrepo > c:\svndump.svn
> 7z svndump.svn svndump.7z // or whatever the correct syntax isI was wondering if there would ... | Piping data on Windows command prompt |
Did thetimeoutoption work, though?..Anyway, if you want to run the cron commands you listed every 10 minutes, then this should work:*/10 * * * * nohup /home/pi/mmal/motion -n -c /home/pi/mmal/motion-mmalcam.conf 1>/dev/null 2>&1 </dev/null &
5-59/10 * * * * pkill -9 motionYou set the "step" after the/, default step is... | I've installed motion mmal on Raspberry Pi and its recording video whenever I run startmotion script:#!/bin/sh
nohup /home/pi/mmal/motion -n -c /home/pi/mmal/motion-mmalcam.conf 1>/dev/null 2>&1 </dev/null &However, Its making continuous video until I stop motion.I want to make a video of 5 minute after every 1... | Set time in cronjob for camera |
I am going to post this solution that I found on someone's blog. It is the only way that I have found so far so safely get the length of a passed in string and compare using anything other than straight equality. In order to make the comparison you must do subtractions and use the difference. The method is outlined in... |
I am using Jekyll on GitHub Pages in order to build a blog and am wanting to get the length of the page.title string passed to the Liquid Template in the YAML front matter in each post. I have not been able to figure out an easy way to do this. Looking at the Liquid For Designers Guide I was able to see that it suppor... | How can I compare a string's size / length in Jekyll's Liquid templates? |
I think you're actually looking for a sandbox and not a firewall. The javasecurity managerlets you do things like this through policies. | I want to host a game called Minecraft and let people upload their own Java JAR.Now I want to restrict them to a certain port range.As running all JVM's in virtual boxes is overkill we just stack them, but how do I prevent a user of using the default port?Maybe something with javaagent in startup line?EDIT:Would this b... | Is it possible to have a firewall around applications? |
There is no reliable solution. Anything wget can do, your browser can do too.Your best shot is something like sending to wget tohttp://example.com/mysript.php?accesskey=some+really+obscure+password+that+only+you+should+knowand check for that access key in your script. Of course, if anyone gets the password, this kind o... | How can I check in my PHP script, that script executeexactlyfromCron Tabbywgetutil, not fromweb browserby any user? | How can I check that PHP script execute by Cron Tab wget? |
The problem is most probably thatsysbenchis not on thePATHused by cron jobs.Instead of:sysbench --test=cpu --cpu-max-prime=100 runUse the absolute path ofsysbench, for example:/usr/local/bin/sysbench --test=cpu --cpu-max-prime=100 runYou can find the correct absolute path usingwhich sysbench.ShareFollowansweredOct 12, ... | I am trying to run the following script using cron for every hourtemp=`date`
date=${temp// /_}
exec 1> /home/ec2-user/benchmarks/results/cpu/$date
sysbench --test=cpu --cpu-max-prime=100 runThe problem is output is not getting redirected to the file although the file is getting created.Could anyone tell what might be ... | script to redirect the output to a file not working with cron |
I managed to enter the admin page finally!
So I added these two lines to wp_admin.php:define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');afterward deleted the .htaccess file, then deleted browsing history, cleared cache and cookies.
After all of this I could enter the admin page.Then I we... | I've got a problem here.
I have a wordpress site and accidentally changed the http to https and I am not sure that I could change it back.
What is sure that it loged me out and when I reload the admin login page it throws an error that my connection is not private and after that I got a 403 Forbidden page.I have access... | wordpress 403 error on admin login page |
Very short and effective solution, that will work 100% on any AWS settings. Put this in your application controller.before_filter :move_to_https if RAILS.env == "production"
def move_to_https
redirect_to request.url.gsub("http","https") unless request.url.include?("https")
endThis will convert any domain traffic to... | I created a load balancer with autoscaling group. It was working really fine until i applied SSL certificates and redirected the traffic to HTTPS. The load balancer health check is http one and i cannot move that check over to https because the certificates are applied on load balancer. So the current stack is Rails 4.... | Load Balancer Health Check After Applying AWS SSL certificates |
17
My usual checklist:
On AWS console: is the Instance up and healthy?
Is it in a public Subnet?
Does it have a public ip?
Does the VPC have an associated Internet Gateway?
Does it have the Routing Table to the Internet Gateway? (Attached to the subnet?)
Are the Network ... |
I can't access to AWS EC2 instance from one day.
(AMI: ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20121001 (ami-22ad1223))
$ ssh -v -i mykey.pem [email protected]
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for ... | AWS ssh access 'port 22: Operation timed out' issue |
1
I know this is a very old question but this could be helpful.
If you are looking for an event that executes when the angular app is destroyed, you can use the PlatformRef which has an OnDestroy() callback
in main.ts
function doSomethingOnAppDestory() {
console.log('test... |
I have a requirement to destroy Angular2 Application when user is navigated to other page (Note: It is an application where we are using angular2 for one page only). So when the user navigates away from this page, we have to unbootstrap the ng2 app.
I am taking applicationRef as follows:
platformBrowserDynamic([
{... | Destroy Angular2 Application |
First I'll start by saying w3schools doesn't have particularly good references for anything. TheApache mod_rewrite documentationis really good, and I always go there first.The first part of your request is pretty straightforward as a rewrite. But before we get there, let's start by preventing direct requests toindex.p... | My main question is, for security reasons, I'd like to know if it's possible to virtually change the name (in a sense) of a website file using .htaccess. For instance, if I have a file/index.phpand I want to make it such that calls for/mysiteare redirected to/index.php, but Ialsowant calls to/index.phpto return as eith... | change file-name with .htaccess |
This is because when you test your lambda with a packet, say
{
"var1": "2017-04-17T18:48:03.608Z",
"var2": "0.45",
"var3": "0.5"
}
Then that packet is passed as the event to the handler.
However, you are doing JSON.parse(event.body), but for the above packet, event.body is undefined(which has token u at positio... |
running Lambda test with
{
"var1": "2017-04-17T18:48:03.608Z",
"var2": "0.45",
"var3": "0.5"
}
Function:
exports.handler = (event, context, callback) => {
console.log("event.body = " + event.body);
const {var1, var2, var3} = JSON.parse(event.body);
const tmpItem = {
"var_1": var1,
... | Getting SyntaxError: Unexpected token u in JSON at position 0 when running Lambda Test |
I know its old but I fixed this issue by simply disabling 'Enable AJAX add to cart buttons on archives on the' on the settings >> Products tab. Not elegant as it would be nice for the AJAX to work but dont have the time to dig around. Hope its of help to soemone out there.ShareFollowansweredMay 27, 2014 at 18:04Surfing... | I got the problem that when I click add-to-cart as guest customer, the cart always says emptybut it's all fine with when I'm login as adminMy server using varnish , nginx, php-fpm
and I add varnish conf and nginx conf for woocommerce to not cacheand I also has change the session.save_path to /tmp and set the permission... | woocommerce add-to-cart empty |
In general, those claims about Nexus 10's behavior are correct. There are some other things about calling some of the RS runtime functions (for example, don't call rsGetAllocation) that would cause the CPU to run a function. However, I think globals that aren't allocations or bound pointers are okay in 4.2.
Going forw... |
I know that Renderscript's design is to obscure the fact about what processor I'm running on, but is there any way to write the code such that on GPU-compute-capable devices (at the moment, Nexus 10), it will run on the GPU? Is there any way to tell that a script's function is running on the GPU?
www.leapconf.com/down... | Renderscript and the GPU |
Devise omniauth expects other callback URL.Try:URL:
http://127.0.0.1:4000
Callback URL:
http://127.0.0.1:4000/users/auth/github/callback | What are the correct URLs to register in an application in Github? I have a rails application that I am trying to connect to github through omniauth/devise. The problem is that each time I tried to authenticate through devise I get this URL> http://127.0.0.1:4000/auth/github/callback?error=redirect_uri_mismatch...in my... | Correct Github Application URLs |
You can useweave exposeto expose weave Subnet. | I'm running a kubernetes cluster on AWS using Weave with a private topology. I have some multi-node applications (like Spark) that have a UI web page. I can expose that via a load balancer, but all the links to the workers, etc. use the k8s local ip addresses. Is it possible (via kubectl proxy or otherwise) to temporar... | browse kubernetes network form outside |
Historically,AWS VPCs have not supported multicast.The AWS engineers have recently developed aproof-of-conceptmulticast overlay, that has support for IGMP snooping.SeeOverlay Multicast in Amazon Virtual Private CloudThis is only proof-of-concept and is not yet fully supported. | In order to make optimal use of network bandwidth in a communication 1->n I need to use multicast. In an on-premise datacenter with switch having IGMP snooping, the advantage of multicast is obvious. However, in IaaS like AWS this is not obvious as we are abstracted from the HW infrastructure. The problem comes when yo... | Does AWS support multicast and IGMP snooping? |
8
This is now possible with docker build arguments.
https://docs.docker.com/engine/reference/commandline/build/
docker build --build-arg TAG=v0.0.1 .
PS: For a multistage build, you need to pass it via all build stages.
Share
Improve this answer
... |
I'd like to be able to access the tag/revision used to build a docker container from within that container. Is there a simple way to surface the tag/revision during the build as an environmental variable?
For example, I would like an API running inside a container to know its current revision. Without docker I would n... | Accessing tag as an environment variable inside a Docker container |
The quickest way to obtain the library is to download it as ZIP file from GitHub.Steps:Navigate tohttps://github.com/pedant/sweet-alert-dialogin your browser.Click on theClone or downloadbutton (green).Click on theDownload ZIPbutton (blue).See below:To make changes to Sweet Alert Dialog, we will import it into Android ... | I use for example librarySweet Alert Dialog. I want to modify this library by adding text size customization tolibrary/src/main/java/cn/pedant/SweetAlert/SweetAlertDialog.java.public SweetAlertDialog setTitleText (String text, int size) {
mTitleText = text;
int height = (int) TypedValue.applyDimension... | Modify and test an Android library from GitHub |
The solution was a bit strange. Here's the steps to solve it:
Clone repository using EGit
Eclipse refuses to import project, claiming it already exists. Exit import dialog.
Create new project using existing code, using cloned repository
Share project with old repository
Now the project is once again connected to the... |
I just started my third repository on Github. I initialized the repository on the website with a README file and tried importing it into Eclipse with Egit. Like my other projects from Github, the import dialog worked fine and the repository was cloned. In my file explorer, I can see the folder Egit created, as well as... | Importing with EGit clones repository but doesn't let me import project |
Your only real option is logminer, which isn't for the faint of heart.The documentation is here:http://docs.oracle.com/cd/B19306_01/server.102/b14215/logminer.htmv$sqlrows may get aged out after a while. Did you account for case sensitivity when looking inv$sql?select * from v$sql where upper(sql_fulltext) like '%UPDAT... | Someone (or something) actually updated a value in my table wrongly. I am trying to find out when the update happened. Unfortunately, there is no audit trigger being created for the said table.Is there other ways or logs that I can check and verify what SQL statements were run at what time?I had tried to look at v$sql ... | Oracle DB audit trails |
If you are on Windows it may be cached by WinInet proxy cache, depending on what application is running. On a corporate network, there maybe a cache in your corporate proxy. Your ISP may have a cache. Products like Squid, Varnish, ngnix are used as HTTP intermediary caches.It is impossible to say what chance there i... | I see that one of the big benefits of REST is relying on HTTP caching. I'm not arguing with this and completely buy into the idea. However, I never see a deeper explanation of intermediary HTTP caches.If I set the Cache-control header to "public, max-age=86000" or any other max-age that would cause a response to be cac... | What and Where are Intermediary HTTP Caches |
This is an older version of Docker-compose. The reason for doing this is to start a container, which creates volumes and then exits.So the below starts a container and existsdb-data:
image: mongo:3.2
volumes:
- /data/db
- /var/lib/mongodb
- /var/log/mongodb
entrypoint: /bin/trueInside that... | This is thedocker-compose.ymlfile in MEAN.js. Could anyone can explain why theentrypointis set to/bin/truefor web-data and db-data? Is this necessary? and what would happen if I remove it? Many thanks.version: '2'
services:
web:
restart: always
build: .
container_name: meanjs
ports:
- "3000:3000"... | Why entrypoint is set to 'bin/true' in docker-compose.yml |
So I typed this command in my git repo directory:
git config user.email [email protected]
to change that very generic email to my actual gmail, then it works!
Cheers!
|
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve th... | This email is too generic for verification Github [closed] |
For reading Excel file I would recommend ExcelDataReader. It does very fine with reading large files. I personally tried 500k-1M:
using (var stream = File.Open("C:\\temp\\input.xlsx", FileMode.Open, FileAccess.Read))
{
using (var reader = ExcelReaderFactory.CreateReader(stream))
{
while (reader.Read())... |
Situation I need to solve:
My client has some extremely large .xlsx files that resemble a database table (each row is a record, cols are fields)
I need to help them process those files (search, filter, etc).
By large I mean the smallest of them has 1 million records.
What I have tried:
SheetJS, and NPOI: both libs o... | How to process extremely large .xlsx files with C# |
The installation ofintlextension is failing because a dependency is missing for it. Please update your Dockerfile with following and it should work.FROM php:fpm-alpine
WORKDIR /usr/share/nginx/html
RUN apk add icu-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN docker-php-ext-configure intl && docker-php-... | I am setting up very basic Docker container for a PHP and Zend framework project. I am using official Docker imagephp:fpm-alpine. Container is running successfully and I am able to see my application. In order for Zend to work I need PHPintlextention. When I addRUN docker-php-ext-install intlcommand inDockerFileextenti... | Docker: unable to install php intl extention when using php:fpm-alpine official image |
45
This was fixed in boto3 1.14.
So given you have a profile like this in your ~/.aws/config:
[profile sso_profile]
sso_start_url = <sso-url>
sso_region = <sso-region>
sso_account_id = <account-id>
sso_role_name = <role>
region = <default region>
output = <default output ... |
I am attempting to create a python script to connect to and interact with my AWS account. I was reading up on it here https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html
and I see that it reads your credentials from ~/.aws/credentials (on a Linux machine). I however and not connecting with an... | How to use the AWS Python SDK while connecting via SSO credentials |
What happens when you run the command by hand? Does it work? If so, it could be a permissions issue. Check all files involved to make sure that the cron user has privilege to read and/or execute where applicable.If it runs manually, then I'd guess it's got something to do with how things are chmod'd and/or chown'd. Fin... | I tried this :0 0 */15 * * /usr/bin/mongo stories /usr/share/cronjobs/15days.js
* * * * * touch /usr/share/neargood/testing.txtThe testing.txt file is effectively created each minute, but the mongo script doesn't have any effect.
15days.js :d=new Date();
mdate15 = new Date(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCD... | Crontab run MongoDB script in javascript file |
On Mac, what I did was going to the docker icon (upper right corner) and clicked restart, maybe is not the best solution, but it´s the fastest oneShareFollowansweredJun 22, 2017 at 0:22Jesus Almaral - HackaprendeJesus Almaral - Hackaprende2,25711 gold badge2525 silver badges3333 bronze badgesAdd a comment| | OS: Centos 7
Docker version 17.03.0-ce, build 60ccb22
docker-compose version 1.11.2, build dfed245I need to map a large range of ports (40000-60000/udp) for RED5Pro server but i always get this error when creating the image:ERROR: for red5pro UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read t... | docker port mapping error |
9
You have to run sbt with a switch limitting the used memory to be less than the available on machine.
Instead of editing files, I run sbt with sbt -mem 256 for example to get -Xmx and -Xms to 256MB. Works fine.
Share
Follow
... |
I'm trying to use sbt on an amazon ec2 micro instance but I'm getting this error when I execute sbt command.
mkdir prueba
cd prueba
sbt
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (malloc) failed to allocate 715849728 bytes for committing reserved memory
Any id... | sbt not working on amazon ec2 micro instance |
There are a few domain lookup API services out there (e.g.,http://www.dynadot.com/domain/api2.html), although I don't know any that support callbacks. I haven't read much of the documentation, either.From the surface, it looks like you'd have to make the request server-side (using PHP or whatever you use) and return th... | I'd like to present the users of a Web app with a form where they type in a prospective domain name, and then using JavaScript the client looks up whether it's available.Is there a way to do that without involving my own host machine? Like sending an AJAX request from the user's browser to some Web service that looks u... | How could I discover whether a domain is registered from the client? |
The solution I ended up on:I usedgit rebase --interactive masterto rebase onto the end of the branch. I then manually deleted the commits that weren't part of the original project. I also usedsquashquite a bit. Finally, I had to resolve some merging issue usinggit checkout --theirs|--ours. This was pretty tedious b... | I accidentally pulled a github repo into a personal project in the same folder as my .git. This has had the effect of intertwining the commits from the repo with my project. Now instead of 30ish commits, I have 600. Is there a good method to extricate these two sets of commits. Can I delete (and deleting them would ... | Accidentally merged github repo into personal project |
Teslas are for more enterprise solutions (where you can expect the Tesla HW to be around for a long time), which the 480s will be here and then no longer in stock within a year (e.g. the GTX 295 is out of stock already). 4-5 480s have more horsepower than 1 Tesla, but that is only beneficial if you can actually lever... |
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 12 years ago.
Improve this question
... | Nvidia Tesla vs 480 for CUDA programming [closed] |
No, it is not possible to transfer Issues from one SonarQube instance to another.As Jeroien Heier pointed out in a comment, the most reliable and elegant solution to your problem would be to have the plugin compatibility fixed. | I have a plug-in that I really like that isn't supported in the latest LTS release of SonarQube. So I want to host an older version of SonarQube to use this plug-in to find issues, and then forward those issues to the newer version of SonarQube.Is this possible? | Can I forward issues from one SonarQube instance to another? |
get an account on docker hub.https://hub.docker.com/account/signup/once signed up (only do that once), you log in from the host that has the image you want to push:docker login
(login with your username, password, and email address)then you push your image up there. you probably will need to tag it first. say you ... | I have a 5GB docker image named "ubuntu-dev-update-15", which I developed on my local Ubuntu 14 dev machine.
In that image I have everything I need to do my development work.
Now I need to be able to send this image to a different linux host.
What is the procedure for doing that? | how to package a docker image in a single file |
You can start with thev3/pulls/reviews/APIGET /repos/:owner/:repo/pulls/:number/reviewsThat will list the reviews for a given PR (not PRtemplatethough, so you might have to create one artificially). | Recently we've started using the github pull request templates to provide more info about the code being checked in.Since there is a template one can see the progress, which is basically the number of fields filled in the PR template.It is something like:My question is, is there an API to analyze the same? Or is there ... | Github PR template progress API |
I'm not aware of a way to get docker labels from Kubernetes. The downward api allows you to get k8s labels into a pod however:https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/ | We are building our docker-images, and adding a few metadata-labels during docker build, e.g:docker build --label no.company.version=1.2.3 .When we at some point later in time use this image in a kubernetes pod, we would like to retreive that labels from the kubernetes api. This would be useful for tracking other metad... | Get docker-image labels from kubernetes API |
When you push a view controller onto a navigation controller you need to release it as the navigation controller now owns it. For example you would do the following:
UIViewController *controller = [[UIViewController] initWithNibName:@"Nib" bundle:nil];
[self pushViewController:controller animated:YES];
[controller re... |
first of all... i'm italian, so i'm sorry for my bad english!
so... this is my app:
i'm using a navigation controller: in the first view there are 10 buttons and every button calls a functions like this:
[self pushViewController:nameview animated:YES];
to a different uiviewcontroller! So i have 11 uiviewcontrolle... | Navigation Controller and Bar - Memory Managment |
This sounds like a job for FetchContent: a fairly recent couple of scripts that should be able to do exactly what you want. That is, download either compiled binary zip files from fixed URLs or even pull in and build the latest commit in a given branch.
FetchContent is especially helpful, since it does all this at co... |
I have made a project on github that uses several libraries such as glew, glm, sdl2 or sdl2_image.
I use them by having them in an a folder named 'external', and building them from source using CMake.
My problem is trying to setup that 'external' folder right after cloning the repo, so that it is easy for the user to ... | How should I link to library dependencies from my git repository? |
As@smac89explains above,stepscan't be executed in parallel, onlyjobsandworkflowscan.Theofficial Github Documentationshares this illustration about the Github Actions structure:What probably happened in your case was that you created 2 jobs instead of 2 steps.The syntax to split your steps should be something like this:... | I'd like to use GitHub Actions to publish an npm package. So far I am using quite a trivial script to do that. Now I'd like to split one step of the script into two consecutive ones.
here's an excerpt from my workflows/...yaml file:steps:
# ...
- name: Build
run: |
cd src
npm install
... | (GitHub Actions) Split step into two consecutive ones |
Try the following:crontab -r
crontab /var/spool/cron/crontabs/multi(edit) I believe in Java, you can call these this way:Runtime.getRuntime().exec("crontab -r");
Runtime.getRuntime().exec("crontab /var/spool/cron/crontabs/multi");First one removes the existing crontab. Second one installs the new crontab. And then yo... | I am writing a cron job to my crontab file using following java codePrintWriter writer = new PrintWriter("/var/spool/cron/crontabs/multi","UTF-8");
String cronTabString="25 13 * * * sudo wget --tries=0 \"https://some-url.com:7443/DataUpdater/updateChildren?folderId="+folderId+"&clientId="+clientId+"&clientSecr... | writing a cron job prgrammatically to crontab file does not run |
The most known solution for managing scaling a docker-based infrastructure are:docker swarmKubernetesfor CoreOS,FleetApache MesosThis articlementions:In terms of scale, only Mesos has been proven to support large-scale systems of hundreds or thousands of nodes. However, when looking at small clusters of, say, less than... | To make a scale-able architecture with docker containers is a very attractive solutions to deal with scale-ability issue. We can auto scale docker containers in Amazon Elastic Beanstalk environment or in a vendor specific pass environments.What is the best way to make your own scale-able docker architecture on commodit... | How to auto scale docker containers in a regular cloud server? |
Fromhttps://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#how-does-the-horizontal-pod-autoscaler-workIf multiple metrics are specified in a HorizontalPodAutoscaler, this calculation is done for each metric, and then the largest of the desired replica counts is chosen. If any of those metrics cannot... | We have configured to use 2 metrics for HPACPU UtilizationApp specific custom metricsWhen testing, we observed the scaling happening, but calculation of no.of replicas is not very clear. I am not able to locate any documentation on this.Questions:Can someone point to documentation or code on the calculation part?Is it ... | How kubernetes HPA with 2 or more metrics behaves - especially the no.of replicas calculation? |
For adding virtual hosts to your Apache use this tutorial:https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-7It's my first time seeing someone that puts virtualhost information on 2 files, both at theapache2.confand at thesites-availablefolder. In my setup, I have an "include... | So I havewww.example.comandm.example.com. Now when I go tom.example.comI see the same content aswww.example.com. I have anindex.phpinside them.example.com, so I'd expect that to show instead.Here's mym.website.com.conf<VirtualHost *:80>
ServerName m.example.com
ServerAdmin webmaster@localhost
DocumentRoot... | Main page on main domain, affects subdomain. |
The source of the instruction replay in this case is non-uniform constant memory access within a warp. In you code, tab is stored in constant memory and indexed according to some combination of thread index and data stored shared memory. The result would appear to be non-uniform access threads within the same warp. Co... |
I ran the visual profiler on a CUDA application of mine. The application calls a single kernel multiple times if the data is too large. This kernel has no branching.
The profiler reports a high instruction replay overhead of 83.6% and a high global memory instruction replay overhead of 83.5%.
Here is how the kernel g... | What Causes Instruction Replay Overhead in CUDA |
Docker sets up the hosts file when you run a container, so you don't want to manually edit it. Instead you can use the add-host option:
> docker run --add-host 1.local:127.0.0.1 alpine ping 1.local
PING 1.local (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.050 ms
You can have multiple add-h... |
I'm trying to create a container based on PHP:5-apache with many virtual hosts like
account.site1.local
account.site2.local
account.site3.local
I can add all the vhosts with a wildcard on the apache conf. Is it possible to do something similar for the hosts file?
| Docker compose extra hosts with wildcards |
Arkascha was right after all, it seems that \r\n was present but vim did not show it.When I usedcat -vE /home/deploy/cronjobScripts/tmpit showed the\rafter removing those with dos2unix the cronjobs worked perfectly | I'm using a script to add multiple cronjobs to users at the same time like so:sed -e "s/\[\[USER\]\]/$user/g" $file > /home/deploy/cronjobScripts/tmp
crontab -u $user "/home/deploy/cronjobScripts/tmp"
crontab -u $user -l$file points to a path with the template cronjob file.But after crontab adds it to a user, it adds ^... | crontab adding carriage returns |
8
When you created your user pool, you selected the required attributes, is email ticked in your personal pool?
For signin, you need to activate the username sign in in AWS! Directly from your user pool.
I think you forgot an s to attribute:
Auth.signUp({
username: t... |
I am trying to set up authentication using AWS.
After entering username, password, email, and clicking Sign Up, I got an error message that says
"error signing up, Attributes did not conform to the schema, email: the attribute is required"
In AWS Cognito, the options I selected in my User Pool were that the
1.) Usern... | Error Signing Up, Email: the attribute is required |
Since there is no requirement in the specification about the memory consumption or time complexity you will need to use another function (possibly self implemented) if you have constraints on memory consumption (at least if you want portability).There is indeed algorithms (fx quick sort) that haveO(n log n)complexity a... | I have a program where I need to read bytes of data in RAM, sort that data using qsort, and write the data back out to a file, the catch is that I'm only allowed use a certain amount of memory to do so.
Here's a jist of what I've done:FILE *fp;
/* open file for reading up here , blah blah blah*/
...
int mb = 1024*102... | qsort in C uses twice the amount of memory |
In my case, i just had to create another task, hourly from the beginning, and it worked. The old schedule was removed as the new one started to work. | I used heroku scheduler to automate tasks but it seems it's not working as it described
see thisalthough the frequency is set to hourlythe interval between last run and next due is 5 hourswhat's going on here?Any help is appreciated! | Heroku scheduler not running hourly |
You can do:// Code refactor
function look(country) {
const countries = {
sa: 'South Africa',
uk: 'United-Kingdom',
northkorea: 'North-Korea',
au: 'Australia',
hongkong: 'Hong-Kong'
};
const toUpperCaseFirstLetter = c => c.replace(new RegExp(/\w/), s => s.charAt(0).toUpperCase());
return cou... | I have this function which has complexity greater than 12. I am trying to bring down it's complexity. I searched around but couldn't find anything too useful is it possible to reduce this complexity? - if so, how would I go about doing so?Here is the functionfunction sea(name) { +1
if (name === 'sa') { +... | How can I reduce cyclomatic complexity for the function |
Segmentation fault can also occur under following circumstances:
a) A buggy program / command, which can be only fixed by applying patch.
b) It can also appear when you try to access an array beyond the end of an array under C programming.
c) Inside a chrooted jail this can occur when critical shared libs, config file... |
Whenever a segmentation fault occurs, do we always have a page fault?
Anyone with linux kernel code experience can you pleas point the code here too?
I have already seen: segmentation fault vs page fault
| Does a page fault occur whenever we have a segmentation fault? |
I haven't used this specific operator framework, but the concepts are familiar. Create a predicate function like this and use it when you are creating a controller by passing it into the SDK'sWithEventFilterfunction:func specificConfigMap(name, namespace string) predicate.Predicate {
return predicate.Funcs{
... | I've an operator which run a reconcile for some object changes, now I want to add ability to reconcile when specificconfigmapis changing, (my operatordoesn'tresponsible on this CM just needs to listen to it and read on changes...) from the docs I think I need to use theOwns(&corev1.Configmap{})but not sure how to do it... | K8s operator listen to specific config map |
GitHub pages orGFM (GitHub Flavored Markdown)themselves does not have a feature for that kind of snippet code presentation.For GitHub pages, you would need to upload an HTML page, with the right CSS, n order to achive that kind of presentation. | How to create code snippet with tabs in Github, something like this:: | How to create code snippet with tabs in Github? |
I figured it out - curl's progress stats:(100 65622 0 65622 0 0 1039 0 --:--:-- 0:01:03 --:--:-- 1927)were being written to stderr for some reason - adding 2>&1 at the end of the command fixed it:2 * * * * /usr/bin/curl --basic --user 'user:pass' http://localhost/cron/do_some_action > /var/www/app/cr... | Have the following cronjob set up in root's crontab: (centos 5.x)2 * * * * /usr/bin/curl --basic --user 'user:pass' http://localhost/cron/do_some_action > /var/www/app/cronlog.logInvoking the actual command works as expected, however when the cronjob runs, it always times out. I've usedset_time_limit()and related php.i... | cron job seems to be timing out |
This warning means that you even though you are redirecting to an HTTPS link you are sending parts of your page over plain HTTP.You should make sure that everything is over HTTPS to avoid this warning and pottential vulnerability.I can't give you any hints on how to fix this since you haven't said much on your applicat... | I have purchased an ssl certificate and installed it on my ubuntu apache2 server as directed by the issuer. I then then added the following to /etc/apache2/sites-available/ssl-[mysite]:<VirtualHost *:443>
ServerAdmin [me]@[mysite]
ServerName www.[mysite]
ServerAlias [mysite]
# Indexes + Directory Roo... | How do I get ssl certificate to work with my django app |
1
The problem was in the importing function that it takes long time to perform which considered by the system as the app is not responding.
The crash report said:
....
Application Specific Information:
****.**** failed to resume in time
Elapsed total CPU time (seconds): ... |
I have a function that reads file and analyses it. It works properly if the device is attached to xCode or to Instrument, but it crashes when the app runs alone. Instrument shows no more than 1.5MB for allocated memory and no leaks.
After investigating I found that the function crashes after reading some records. I th... | App crashes if not linked to XCode or Instrument |
The easiest approach is to enable a socks proxy when configuring the wifi AP you are connecting to. This varies depending on the version of android, but it is typically something like:Touch and hold the wifi network you want to connect to.A dialogue box should pop-up. In that dialogue box, select advanced.Find the prox... | I'm working on some test project, basically I want to route all traffic when I'm in hotspot mode into a fixed address. I have the IP range for example 192.168.0.0/24 I don't know if I can use iptableswithout rootor JNI functions (can't find any that match what I want)
Thinking out of the box is very welcomed (DNS, low ... | How to route all traffic coming from tethering? |
The structure ofMessageIDshould be:If yourMessageIDdoesn't have this exact structure - PHPMailer will ignore yourMessageIdand generate it's own MessageId.You can change your code to:$mail->MessageID = "<" . md5('HELLO'.(idate("U")-1000000000).uniqid()).'-'.$type.'-'.$id.'@domain.com>';And it should work. | I send emails using PHPMailer, evthg works well but I would to set a uniq MessageID for each email.PHPMailer version : "v5.2.16"(loaded with Composer fromhttps://github.com/PHPMailer/PHPMailer.git)I found the documentation here :http://phpmailer.github.io/PHPMailer/classes/PHPMailer.html#property_MessageIDso here is wh... | PHPMailer : replace the default messageID |
Add these right belowRewriteEngine OnRewriteCond %{THE_REQUEST} \ /+login\.php\?task=([^&\ ]+)
RewriteRule ^ /login/%1/? [L,R]
RewriteCond %{THE_REQUEST} \ /+login\.php($|\ )
RewriteRule ^ /log-in/ [L,R]Note that you're changing your relative URL base, so all your relative links will be broken. In order to fix that, y... | RewriteEngine On # Turn on the rewriting engine
RewriteRule ^log-in/?$ login.php [NC,L] # Handle requests for "pet-care"
RewriteRule ^login/([A-Za-z0-9-]+)/?$ login.php?task=$1 [NC,L] # Process parrotsMy .htaccess file contains this, but its not affecting the url.
I checked the apache config ... | my htaccess does not affect the url |
If you do this,
UIView *v = [[UIView alloc] init];
[self.view addSubview:v];
[v release];
or
UIView *v = [[[UIView alloc] init] autorelease];
[self.view addSubview:v];
,the v will be released when its parent view release;
When the parent view use addSubview, it will retain the subview, and will release the subview... |
If I alloc/init a view and add it to a another view in code (I did not use a xib) - do I need to remove it when the containing UIViewController's dealloc message is sent? I have seen this code in certain places, and wondered is it necessary under some circumstances to free memory?
Thanks,
Marc
| Do I need to remove views from superviews in dealloc? |
As of some time apparently between last Friday and today, they've finally added a BucketEncryption property to S3 buckets in CloudFormation, allowing you to enable this default encryption.
|
This question already has answers here:
How do you set SSE-S3 or SSE-KMS encryption on S3 buckets using Cloud Formation Template?
(3 answers)
Closed 6 years ago.
S3 now supports en... | CloudFormation template to set S3 bucket default encryption [duplicate] |
As described in "Finding a branch point with Git?", that should be possible with Git 2.36 (Q2 2022):(branch_A_tag)
|
--X--A--B--C--D--F (master)
\ / \ /
\ / \ /
G--H--I--J (branch A)vonc@vclp MINGW64 ~/git/tests/branchOrigin (branch_A)
git rev-list --exclude-first-parent-only ^master ... | There are two branchesmasterandA. I know that some work has been done in the branchAa long time ago. Whoever was working on that branch, merged themasterbranch into the branchA, then merged the branchAto themaster. All the branched are in remote. Now how i can find the commits that originally come from branchA?N.BI am ... | How to find native/original commits of a branch? |
Go to your "mongodb installation dir" (Common Path is /etc/mongo):cd <mongodb installation dir>Type ./bin/mongo to start mongo:./bin/mongoIf you have added the /bin to the PATH environment variable, you can just type mongo instead of ./bin/mongo.To display the database you are using, type db:dbThe operation should retu... | I successfully installed MongoDB on an Amazon Linux AMI by following this tutorial:https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-amazon/The log (/var/log/mongodb/mongod.log) shows that mongo is up-and-running, so I know it was correctly installed.However, I can't figure out how to access the mongo shell. I ... | Where is mongo shell installed on Amazon Linux? |
I am on the Cognito team. This is not configurable. We do have protection mechanisms to prevent users from abusing forgot password APIs which is probably what you are witnessing.
|
I have implemented a change password feature and now I would like to test it. But I’m facing the limit of attempts.
What should I do to prevent this error?
Attempt limit exceeded, please try after some time
| How to edit the limit of attempts to change a password in AWS Cognito? |
Unfortunately it doesn't seem to be possible at the moment. The only solution I see is to create an own policy for each of characters [a-zA-Z0-9] so that each of these policies match to tagged images prefixed with that letter. Like this:Policy 1: when tagged and prefixed with "a", expire after 30 days
Policy 2: when ta... | I want to set a lifecycle policy for my ECR. For all tagged images to have image count more than 1.
It's currently set to Prefix and can't set it blank.aws ecr policy console:Thanks in advance. | How do you set a lifecycle policy for an ECR for tagged with any prefix? |
Sorry, I should have posted the answer.Yes I was able to resolve the issue using below:In new version of Git client , the git client uses the GIT_ASKPASS method which creates a temporary script to execute when git ask for credentials during the build.By default it runs inside Jenkins workspace, which is mounted on a fi... | I have a Jenkins pipeline in which I am using Git plugin to checkout the pipeline code from a shared library but I am facing the issues as below:SSH authentication and password authentication is disabledwhen I am using token with the repository URL in git plugin, it is visible in jenkins console output, is there any wa... | Not able to use secure credentials in Jenkins Git Plugin |
I found a solution to this problem. You can actually exclude the unwanted projects under the parent project using following setting in your sonar.gradle:project(":project-1") {
sonarqube {
skipProject = true
}
}
project(":project-2") {
sonarqube {
skipProject = true
}
}If you want even... | I have to run Sonarqube analysis for a Java project which is a subproject among 4 others, something like below:Parent-project
-> serviceA
-> src/main/java/...
-> serviceB
-> src/main/java/...
-> serviceC
-> src/main/java/...
-> serviceD
-> src/main/java/...
-> gradle.proper... | Sonarqube: scan subproject instead of whole project with custom gradle task |
13
When building your docker image postgres is not running. Database is started when container is starting, any sql files can be executed after that. Easiest solution is to put your sql files into special directory:
FROM postgres:9.4
COPY *.sql /docker-entrypoint-initdb.d/
... |
Trying to make Dockerfile for postgres db need for my app.
Dockerfile
FROM postgres:9.4
RUN mkdir /sql
COPY src/main/resources/sql_scripts/* /sql/
RUN psql -f /sql/create_user.sql
RUN psql -U user -W 123 -f create_db.sql
RUN psql -U user -W 123 -d school_ats -f create_tables.sql
run
docker build .
result:
Sendin... | Configure dockerfile with postgres |
Do i figured out correctly?YESExplanation1) Main memmory size is 2048 bytes = 211. So you need 11 bits to address a byte (If your word size is 1 byte) [word = smallest individual unit that will be accessed with the address]2) You can calculating tag bits in direct mapping by doing (main memmory size / cash size). But i... | i am really confused on the topic Direct Mapped Cache i've been looking around for an example with a good explanation and it's making me more confused then ever.For example: I have2048 byte memory64 byte big cache8 byte cache lines
with direct mapped cache how do i determine the 'LINE' 'TAG' and "Byte offset'?i believe... | Direct mapped cache example |
It might be related to this GitHub issue:
Visual Studio Code hangs on breakpoint when attached to a remote debugger on a Windows Docker container #31070
|
I have a .NET Core application running in a Windows Docker container that I want to attach Visual Studio Code to. When I do attach to the remote process, it seem the process freezes and if I disconnect the debugger, the container shuts down without any errors.
File launch.json:
{
"name": ".NET Core Remote Attach",... | .NET Core CLR debugger VSDBG halts the application when attaching to a remote process in a Windows Docker container |
.) Yes, a Deployment is a ReplicaSet, managed at a higher level.2.) No, a Deployment can not have multiple ReplicaSets, a Deployment pretty much IS a ReplicaSet. Typically you never use a ReplicaSet directly, Deployment is all you need. And no, you can't have different Pod templates in one Deployment or ReplicaSet. The... | As per the Kubernetes documentation there is 1:1 correspondence between Deployment and ReplicaSets. Similarly depending on the replicas attribute , a ReplicaSet can manage n number of pods of same nature. Is this a correct understanding ?Logically (assuming Deployment is a wrapper/Controller) I feel Deployment can have... | How many pods can be configured per deployment in kubernetes? |
if you use url segment is correct. It wont show error it call the class and its function no need to create a route for that. For exampledomainName.com/myClass/firstFunctionfrom above code my class name ismyClassso it call the class if the class exist then it goes to the function that isfirstFunctionand execute that fun... | I downloaded the CodeIgniter version of 2.2.6. I made configuration on config.php. Everything is normal up to now :) After I added another controller into my project. And boom :) It worked without any route condition. Futhermore, When I removed all routes file, it was still working.How could it be possible? is there a... | Codeigniter is running without route? |
You can create create multiple virtual hosts that allow you to host multiple sites, independent from each other. More info here:http://wiki.nginx.org/VirtualHostExample.A bit more detailed info here as well on how to setup virtual hostshttp://projects.unbit.it/uwsgi/wiki/RunOnNginx#VirtualHosting. | Is it possible to run multiple Django sites on the same server using Nginx and uWSGI?I suppose it's necessary to run multiple uWSGI instances (one for each site). I copied /etc/init.d/uwsgi to uwsgi2 and changed the port number. But, I got the following error:# /etc/init.d/uwsgi2 start
Starting uwsgi: /usr/bin/uwsgi al... | How to run multiple Django sites on Nginx and uWSGI? |
pyspark client mode works on Spark's latest version 2.4.0This is how I did it (in Jupyter lab):import os
os.environ['PYSPARK_PYTHON']="/usr/bin/python3.6"
os.environ['PYSPARK_DRIVER_PYTHON']="/usr/bin/python3.6"
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
sparkConf = SparkConf()
s... | I recently saw apull requestthat was merged to the Apache/Spark repository that apparently adds initial Python bindings for PySpark on K8s. I posted a comment to the PR asking a question about how to use spark-on-k8s in a Python Jupyter notebook, and was told to ask my question here.My question is:Is there a way to cre... | PySpark SparkSession Builder with Kubernetes Master |
You should be able to enableRequire pull request reviews before merging.When enabled, all commits must be made to a non-protected branch and
submitted via a pull request with the required number of approving
reviews and no changes requested before it can be merged into a branch
that matches this rule.By doing this it s... | We want to block people from pushing directly to master. But we also want people to be able to merge their PRs into master.I've tried selectingRestrict who can push to matching brancheson the master branch. This automatically selects an option to allowOrganization administrators, repository administrators, and users wi... | How to allow in Github merging Pull Requests into master/main, but protecting pushing directly |
There are number of things you can configure to increase performance. Not only does Tomcat itself offer different settings, but the obvious JVM settings to tune performance can also be done. For a more in-depth analysis on increasing Tomcat performance, you can refer to,https://www.mulesoft.com/tcat/tomcat-performance.... | I have a Hibernate/JPA + Primefaces/JSF application running on Tomcat7.0and my server gets an upgrade from8Goto16Goand I want to increase the space allocation to my application my question isHow to do it?Adding more space to my application will make it faster (user experience)?(I am working with Apache Tomcat7.0) Thank... | How to add space to apache tomcat server |
After several checks, rbacs, namespaces, etc. a member from Traefik told us that the k8s objects are loaded asynchronously (so the ingress may be loaded before the secret) this is the reason because it gives a problem at start of the Traefik. | IntroductionConfiguring a new ingress-controller with Traefik using helm chart and creating secrets.InfoKubernetes version: 1.9.3Helm version: 2.9Traefik chart version: 1.5Traefik version: 1.7.2ProblemI am deploying Traefik through official helm chart, but always I have the same problem in the logs"Error configuring TL... | Error configuring Traefik TLS "Error configuring TLS for ingress secret does not exist" |
Finally I've found a workaround. I save what I need manually in my app cache directory, and when I have to load it again I check if it is inside that directory. That solution works on all android versions. | In my app I have an activity with a webview wich loads different images. Before loading the webview, I need to know if the image is already cached in the webview cache. I've found this working solution for 2.3 android devices and lower:String uri = "http://the url of the image that you need";
String hashCode = String.f... | Check if file already exists in webview cache android |
You can catch the OSError exception but this may not help your program to continue where it left off.To do this well you need to interpose some code between Python andmalloc. You can do that usingLD_PRELOADas per the details here:How can I limit memory acquired with `malloc()` without also limiting stack?The idea is y... | Sometimes a Python program stops with an exception like the following, when there is not enough memory:OSError: [Errno 12] Cannot allocate memoryCan I make it wait until memory is available again instead of dying unrecoverably?
Or at least freeze until the user sends a SIGCONT or something to it?It's not my program, so... | How can I make Python wait when it cannot allocate memory? |
While hunting a solution for the same problem I foundthis Threadwith several tips.the quick & easy way for me was to just run the cron command as login shell - like this:* * * * * /bin/bash -l -c 'bundle exec rake _0.9.2.2_ [my_task]' 2>&1the ending2>&1is just to be sure to receive errors in cron log. also seeman bashf... | I would like my cron job, which calls a rake task, to use the gems installed in either [rails_app]/vendor/bundle or [rails_app]/vendor/cache. Currently, my system gems are out-of-date, but I cannot update them for various reasons beyond my control.I tried usingbundle exec, but this does not seem to work. The error I ge... | How to make crontab use the correct rake and refer to gems in vendor/bundle |
43
It's not official, but Serhiy Topchiy did a benchmark with different instance types:
http://epamcloud.blogspot.com.br/2013/03/testing-amazon-ec2-network-speed.html
For US-EAST-1, it seems that LOW corresponds to 50Mb/s, Moderate corresponds to 300Mb/s and High correspo... |
When choosing an amazon aws instance type to launch, there is a property of each type which is "Network Performance" which is either "Low", "Moderate", or "High".
I'm wondering what this exactly means. Will my ping be lower if I choose low? Or will it be ok as long as many users aren't logged in at once?
I'm launching... | What does amazon AWS mean by "network performance"? |
For anyone else interested, this link is helpful, pretty much covers most of what you need:http://www.spacevatican.org/2012/9/4/using-glacier-with-fog/It doesn't really provide all details on how to instantiate a glacier object:glacier = Fog::AWS::Glacier.new({
:aws_access_key_id => YOUR_ACCESS_KEY_ID,
:aws_secret_... | The amazon documentation for glacier doesn't seem to include any Ruby examples and the documentation itself is rather sparse.I gather I need to instantiate a Glacier Client object and then use the upload_multipart_part method to access the Glacier API, but not sure how to massage the arguments to pass to upload_multipa... | How to upload large archive to Amazon Glacier using ruby and aws-sdk? |
Docker does not have an app-ified version for Linux that I know of, so there is no relation to the Docker for Mac/Windows app. There are many tools to locally install Kubernetes on Linux so they probably didn't see much reason to make something new. Minikube is the traditional one, but you can also check out microk8s, ... | I am using docker and trying to enable kubernetes and set CPU and Memory via command line.I have looked at this answer but unfortunately cannot find this file.Is there any way to enable Kubernetes on Docker for Mac via terminal? | Is there a way to enable kubernetes on docker via command line on linux? |
I ended up usingAutoMySqlBackup, this is a small script which backsup everything the user has access to and rotates it over a 5 day period. | I need to backup all MySQL databases available to a partiular user and store themdatabasename_date.sqlIs there any way to use mysqldump to dump all databases instead of telling it each database name it needs to backup?Thanks | Backup all MySQL databases that a mysql user has access to |
You have to add credentials to each service where you use an image from a private repository. From the docs:
If the image's container registry requires authentication to pull the image, you can use credentials to set a map of the username and password. The credentials are the same values that you would provide to the... |
we are trying to use a private docker image hosted on the Github Package of our organization. Something like this:
on: push
jobs:
runner-job:
runs-on: ubuntu-latest
services:
postgres:
# Github Registry image here
image: ghcr.io/orgname/reponame:tag
But we are getting an unauthorized ... | Login github package registry in private repository from github action service |
The struct has 4x8 bytes, not 4x4.ShareFollowansweredApr 7, 2012 at 1:32zzzzzzzz89.1k1616 gold badges178178 silver badges139139 bronze badges1Ah, thanks for that. How could I miss this. Indeed that explains things :D–metaleapApr 7, 2012 at 2:18Add a comment| | I'm using the following simple Go code to allocate a 3D array of size 1024x1024x1024:grid = make([][][]TColor, 1024)
for x = 0; x < 1024; x++ {
grid[x] = make([][]TColor, 1024)
for y = 0; y < 1024; y++ {
grid[x][y] = make([]TColor, 1024)
}
}That TColor struct is a 4-component float64 vector:type TCo... | How to allocate 16GB of memory in Go? |
1
From the cache sweeper docs:
Sweepers are the terminators of the caching world and responsible for
expiring caches when model objects change.
They do this by being half-observers, half-filters and implementing callbacks for both roles.
Sweeper uses controller to expir... |
A cache sweeper is an observer with some hooks on the model it is observing:
class MySweeper < ActionController::Caching::Sweeper
observe MyModel
def after_update(my_model)
expire_page(...)
end
end
But documentation and guides also say to declare the sweeper in the controller:
class ApplicationController <... | Why do cache sweepers need to be declared in controllers? |
There is no proper answer to your question. Everything depends on your needs in this scenario.
You have to consider resources on your node, your resource requests/limits, will you use HPA or VPA, it's on local environment or on cloud environment, how many pods will be deployed on this node, what you will cache, etc.
B... |
I am looking to deploy a Redis instance to Kubernetes cluster.
In Kubernetes official website here, they use the following yaml configuration for example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-master
labels:
app: redis
spec:
selector:
matchLabels:
app: redis
role: master
... | How much memory / CPU to allocate to Redis instance? |
Not sure if I understand your question correctly. I guess you can just add a rewrite rule like this:apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: servicea
namespace: dev
spec:
hosts:
- "*"
gateways:
- dev-gateway
http:
- match:
- uri:
prefix: /dev
rewrite:... | This is what I want to achieve:
Route traffic to a service based on the URI prefixProblem I'm facing:
Unable to segregate the prefix from the context pathExplanation:I want to route traffic to a services based on the prefix.
Say,/dev/service/context/path/and/test/service/context/path/.
But I'm not able to do so without... | Routing requests to services based on URI prefix in Istio VS |
I think I figured the issue out, my Lambada is in VPC and I had selected a couple of subnets under my Lambada configuration. Some of the selected subnets didn't have access to the internet and I think that was the reason when the lambda container was being created under these subnets(with no internet) it was not able ... | I have Lambda function when invoked it creates SNS topic, adds subscribers to it and then publishes a message to it. After publishing the messages it deletes the topic. The name of the topic to be created and the subscribers are supplied to the lambda function as payload.Sometimes it works and sometimes it fails withTa... | AWS SNS Creation times out |
You could mount a directory with the file inside as a Docker data volume using the -v option:https://docs.docker.com/engine/tutorials/dockervolumes/docker run -d -P --name myapp -v /app mydir/app python script.pyThis will have the added benefit of allowing you to stop the container, make changes to the file, and start ... | I created a docker container with a python script. The python script takes an input file, does some processing and saves output file at some specified location.docker run /app/script.py --input /data/input.csv --output /data/output.csvSince the input file can be different every time I run the script, I want it to be ou... | Docker input/output outside the container |
I found the solution.
What is required to make this happen is to have the notary-server manage the snapshot.
By default this certificate is managed by the client.
See the fix here.
https://github.com/philips-labs/dct-notary-admin/commit/bc0269d93370e2d3d474abdeaca6b0146a440144
Now a client only needs the delegation ke... |
I'm trying following scenario.
On my laptop I have created a delegation key.
On a server I have created the target and authorized my delegation key
Now when signing my Docker image via docker trust I'm getting following error.
An error occurred during validation: rpc error: code = 5 desc = key 6505d5d177b8ad1868d721f0... | Signing docker images with delegation key only |
Not all local memory usage represents spilling. Called functions need to follow the ABI calling conventions which includes creation of a stack frame which is in local memory. When nvcc is passed the commandline switch -Xptxas -v the compiler reports stack usage and spilling as a subcomponent thereof.
Currently (CUDA 5... |
Two facts: CUDA 5.0 lets you compile CUDA code in different objects files for linking later on. CUDA architecture 2.x no longer inlines functions automatically.
As usual in C/C++, I've implemented a function __device__ int foo() in functions.cu and placed its header in functions.hu. The function foo is called in ot... | cuda: device function inlining and different .cu files |
/var/lib/logrotate/logrotate.status shows when logrotate was actually run. This demonstrates the RANDOM_DELAY is always in effect. The "delay in minutes" delays the onset of that random delay. This field is required because in /etc/anacrontab START_HOURS_RANGE=3-22 is defined. This only specifies the hour to start at, ... | The manual says:The delay in minutes variable specifies the number of minutes anacron waits, **if**
**necessary**, before executing a job. This variable is represented by an integer
where 0 means no delay.The RANDOM_DELAY variable denotes the maximum number of minutes that will be
added to the... | what does anacron anacrontab delay in minutes and RANDOM_DELAY actually do? |
0
Turns out an inactive replication slot was responsble for space growth... It was not locking anything, just sitting there - and it was causing log space to grow exponentially each day.
Dropping replication slot (logical) was the solution to reclaiming space. Within 10-1... |
We have an Azure database for Postgres Flexible Server option. Server has been allocated to 512GB, and total size of all databases on the server is about 110G. We had online backups set up for the maximum allowed retention period of 35 days. This had started on July 17th, 2023. Since then, space used on the server has... | Reclaim storage from Azure database for Postgres |
In the second command, I needed to change the -m property to a new serial id number.That fixed the error message and created the certificate.ShareFollowansweredJul 7, 2010 at 18:25DaveDave3111 silver badge33 bronze badgesAdd a comment| | I'm trying to create a self-signed certificate for a test web server running Sun Webserver 6.1 using certutil. I am open to using keytool or openssl if someone has better instructions which work with Sun Webserver.Here are the commands that I use:certutil -S -P "https-myWebapp-" -d . -n myCA -s "CN=myWebserver.com CA,O... | Trouble Creating SSL Certificate |
When youdocker run -p 5000:5000 my-api-docker ~/Desktop/myApiDockerDocker interprets everything after the image name (my-api-docker) as the command to run. It runs/Users/name/Desktop/myApiDockeras a command,instead ofwhat you have as theCMDin the Dockerfile, and when that path doesn't exist in the container, you get t... | I created a Flask Application. This application receives a XML from a url and saves it:response = requests.get(base_url)
with open('currencies.xml', 'wb') as file:
file.write(response.content)When I run the application without Docker, the filecurrencies.xmlis correctly created inside my app folder.
However, thi... | Docker not saving a file created using python - Flask application |
Please findthis linkfrom AWS Blogs which is the exact use case for Cognito User Pool you are looking for and a very detailed step by step guide to implement it. I tried it and it worked, only difference is the deployment code consumes much more resources on S3 and lambda than Js code hence a pricing factor. If you are ... | I am exploring Amazon Cognito for one of my work related needs, I foundthis-aws cognito blog post about to access user pools via java scriptandthis-aws cognito sdk on java, alsothis-use cases to access user pools in javascriptI am lookingsimilarexamples or something similar reference in Java, my objective is to change ... | How to Access User Pools using the Amazon Cognito Identity SDK for Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.