Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Changes on master
A -- B
Local branch after rebase
A -- B -- C -- D -- E -- F
After rebase operation, local branch is already differed from remote.
Now out target is: remote branch
A -- B -- C -- D -- E -- F
I have a "dangerous" advice:
1. Make sure you have backup of your code.
2. rebase your local branch like t... |
I created a branch locally and remotely. To synchronize the changes between local and master, I pulled the changes from master, rebased onto master and resolve the conflicts.
Changes on master
A -- B
Changes on local branch
C -- D -- E -- F
Local branch after rebase
A -- B -- C -- D -- E -- F
However, when I sub... | github pushing local copy to remote |
The problem is here:The mongo containers have same shared volumes with the docker hostYou cannot run two mongo instances on the same data-directory. It would lead to data corruption and strange problems, so mongo-db explicitly prohibits doing that (see alsothisquestion here)Why do you want to do this? Normally you woul... | I want to run two mongo docker containers with docker compose. The mongo containers have same shared volumes with the docker host. When I ran it with docker compose, only one mongo container is working meanwhile the other is shutting down because it saidDBPathInUse: Unable to lock the lock file: /data/db/mongod.lock
... | Can't run multiple mongodb docker container with same shared volume |
Maybe shelve? It's basically a key-value store where you can store python objects. http://docs.python.org/library/shelve.html
Or maybe you could just use the filesystem?
|
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to ... | Is there any nosql flat file database just as sqlite? [closed] |
1
In .NET 4.0, the WebClient class inherits the Dispose method from System.ComponentModel.Component. Since it doesn't override the protected virtual void Dispose(bool disposing) method, disposing of the class only runs the cleanup from the base class - namely, it removes th... |
I just wanted to clarify this. Is this safe in terms of disposing the client:
using (WebClient client = new WebClient(TimeoutInSeconds))
{
client.DownloadDataAsync(new Uri(par.Base_url));
client.DownloadDataCompleted += (sender, e) =>
{
//code that checks e.Result
}
}
And related question: suppose... | using statement and usage of resource in an event |
0
Do not use HorizontalScrollView. Instead, use the ViewPager component that was added to the Android Compatibility Library, as it is designed for this sort of scenario. Here is a blog post that explains a bit more.
Share
Improve this answer
... |
I want to add lazy loading feature to HorizontalScrollView, It has
linearlayout as a child and i am addding to linearlayout,
I am interested in listening to the event when the child view is out
of the visibility area, I see in linearlayout implementation it does
not call either dispatchViewVisibility or onDraw on... | Lazy loading in HorizontalScrollView to prevent Out of Memory issue |
First, Line 9 contains a JSON syntax error, the brackets{}around your Role string should be removed:"Roles": [ "arn:aws:iam::710161973367:role/Cognito_CFIAuth_Role" ],Second,AWS::IAM::Policy'sRolesproperty accepts "ThenamesofAWS::IAM::Roles to attach to this policy", not full ARNs, so your line should be:"Roles": [ "Co... | Following cloudformation template gives error on line 9 :{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Policy to allow send receive message from SQS Queue",
"Resources" : {
"MyPolicy" : {
"Type" : "AWS::IAM::Policy",
"Properties" : {
"PolicyName" : "CFUsers",
"Roles": [ { "arn:aws:... | Attach policy to a IAM Role |
2
I'm realizing now that op offered a solution in the question. Seems like the CLI should do exactly that for sessions, but my bash skills are not confident enough to make that change.
I use this in my bash-profile:
function aws-refresh {
echo "Verifying AWS token..."... |
At my work, our AWS authentication is integrated with our corporate sign-sign-on (SSO) system. In other words, when we want to access AWS, we do something that authenticates to our corporate system and then issues an AWS session token. The tokens expire after an hour so every so often an AWS command will fail because ... | Is there a way to tell aws-cli to run a command to get a new session token if the current token is expired? |
I use the home pc with laptop using SSH.You have to config your router for granting ssh port forwarding. It's pretty easy and there are many resources for this.Install SSH in stationary pcsudo apt-get install SSHInstall ssh client on your laptopsudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-c... | I am going to train a Neural Net using PyTorch. I will be working from a laptop without a dedicated GPU, but I have a stationary computer with a RTX 2070 at home. Is there any way to use the computing power of my stationary computer when working from my laptop?The only possible solution I have now is programming everyt... | How to train PyTorch remotely on another computer? |
The key is fine to publicly distribute, the secret is not.So the answer is yes!Edit: The public key along with the secret is used to generate the nonce / signature. You need both to generate valid (secured) requests for amazon. The secret is private however. | I have some files stored at amazon. all in private mode, and since I need provide users a way to download these files, each time an user needs to download a file I just create a authenticated url according toAuthenticating REST Requestsand the user can download the file for a gap of 5 minutes.BUT once the url is genera... | are authenticated urls at s3 secure? |
When I talk about directories below, I mean the ones in your file system, not the way projects are arranged in the Project Explorer view in Eclipse.
You should create a single repository using the directory that contains all the modules (core, desktop, etc.). Use git init from the command line in your base directory.... |
I'm fairly new to github so this might be a very simple issue. I have been working on a basic game using libGDX. I used the gdx setup tool to create the gradle project and I have since been developing locally. All I wanted was to upload my code to github so I could share code more easily, but I have never done so thro... | Uploading local gradle project to GitHub repository |
4
To me was a solution to change in prisma.yml http://localhost:4466 to endpoint with docker ip - http://192.168.99.100:4466
Also, this could be helpful if the problem is in apisecret https://github.com/prisma/prisma/issues/4483 - here
Share
... |
I'm having trouble with deploying prisma.
The steps I've taken are the following:
create a new folder
run prisma init
select postgresql and fill in the required information.
complete the installation
Now when i got to use docker-compose up -d it creates the container and its running but when i go to deploy prisma, p... | prisma error: Could not connect to server at http://localhost:4466 |
4
I had the same issue when running a lot of concurrent processes testing my application with JMeter. I am using Fedora and by default the process amount available is 1024.
You can check your maximum amount of processes by entering ulimit -u in the command line, and to cha... |
In my application runs in amazon aws instance. In these i am getting the java.lang.OutofMemory error. My instance is running in ubuntu machine. Following is error I am getting. I have google about this but I am not find any solution about this error.
java.lang.OutOfMemoryError: unable to create new native thread
... | java.lang.OutOfMemoryError: unable to create new native thread in Java (Play Framework) |
1.) There are 2 layers of cache in Volley, one is the in-memory cache (in RAM) and the other one is a disk cache. Once a cache is full, the oldest image (meaning the image that hasn't been accessed the longest) in that cache will be evicted when a new image is about to be cached to make room for the new items. When so... |
in the google's own volley image cache tutorial
// Returns a cache size equal to approximately three screens worth of images.
public static int getCacheSize(Context ctx) {
final DisplayMetrics displayMetrics = ctx.getResources().
getDisplayMetrics();
final int screenWidth = displayMetrics.widthPixe... | Android volley image caching questions |
I think this should work:git remote add origin[email protected]:JGHInternet/tillyoudrop
git push -u origin masterTake into account that the remote repository has to exist before you push. | I want to add a remote origin repository so that when I entergit push origin masterIt pushes tohttps://github.com/JGHInternet/tillyoudrop(to the master branch)What should the exact command look like for doing this | How to add an origin repository in Git |
Nginx can handle non-encrypted SPDY frame. Simply use "listen" directive without "ssl" part:
listen 8000 spdy;
"HAproxy (SSL termination) -> Nginx (SPDY) -> your network (HTTP)" setup is described at https://kura.io/2013/07/15/haproxy-nginx-and-spdy-with-ssl-termination-debian-7/
|
I have a Node.js server using node-spdy to run a SPDY server (with HTTP fallback) in { plain: true, ssl: false } mode.
On top of the Node.js server sits Nginx serving and caching static files and proxying requests to Node.js.
On top of Nginx sits HAProxy balancing the load.
When I first implemented SPDY I just used no... | HAProxy, Nginx & Node.js SPDY termination |
The authorizer response format is not the same as the integration proxy response format. I can see this is confusing!
The output of a custom authorizer should conform to this format:
{
"principalId": "yyyyyyyy", // The principal user identification associated with the token sent by the client.
"policyDocument": {... |
I have an API gateway setup with a Custom Authorizer that calls a Lambda function. For testing purposes I copied the example from here: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html#api-gateway-proxy-integration-lambda-function-nodejs
I get the same ... | AWS API Gateway: Execution failed due to configuration error: Invalid JSON in response |
I think you can use taskflow
here's ataskflow docit can add stage easily and don't worry about the parameters communication | I want to create 3 processes(a, b, c) and assemble them in a workflow.ex:
a---->b
b---->c
c---->endoutput of a will send to input of b.I tried ruffus but it designed for file transformation.Is there workflow library in python? | Is there any workflow tool or library in python? |
You should remove that rule. If you don't, the Facebook crawler isn't going to be able to load page titles, descriptions, and thumbnails. | I have fail2ban configured in my server against noscript. However i have some widgets to share content to facebook.Now I am receiving this alert:The IP 31.13.102.103 has just been banned by Fail2Ban after
6 attempts against nginx-noscript.
Abuse contact for '31.13.102.0 - 31.13.102.255' is '[email protected]'So, the q... | nginx-noscript blocking Facebook IPs |
skip the shell script and use* * * * * /usr/bin/nice -n 10 /path/php -q /path/script.phpnice and\or php path may or may not be required | I have this php script that I need to run on shared webhosting.
I have created a cron job that executes an sh script. The command for the cron was:/bin/sh /home/user/script.shSo I'm assuming it is Bourne Shell (or something compatible). The script itself was:#!/bin/sh
cd /home/user/public_html/folder/
#updating DB
php ... | Nice command in .sh script for Cron Jobs |
The series match API takes a selector, not a full PromQL expression. You probably want thequery API. | I'm trying to make a prometheus api call using series api, it is failing with the below error{
"status": "error",
"errorType": "bad_data",
"error": "parse error at char 83: could not parse remaining input \"\u003e 0\"..."
}The query being executed iskube_pod_status_ready{pod=~"cougar-prod-batch-646b68475-dqhrw", ... | Prometheus series api call fails if there is a condition in the query |
you can use options to specify the path to the 'nginx' binary and conf directory (it seems that certbot expectsnginx.conffile in nginx's installation directory if you do not specify it manually)certbot certonly --nginx --nginx-ctl /usr/local/openresty/nginx/sbin/nginx --nginx-server-root /usr/local/openresty/nginx/conf | I'm trying to install certbot on my digital ocean droplet. I'm using ubuntu 20.04 and following instructions fromhttps://certbot.eff.org/lets-encrypt/ubuntufocal-nginx.The error occurs when I runsudo certbot --nginx. The error I get is:The nginx plugin is not working; there may be problems with your existing configurat... | Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable |
As I've mentioned in the comment, firstly push commits to new-origin so your new-origin repository will get updated, then reset your local repository bygit reset head~<no of commits here start from 0> --hardAfter resetting, your head will be at your desired commit. Then push it to origin. You need to force push it:git ... | I have two remotes for one of my git repositories.1. origin
2. new-originI always used to push my commits to thenew-originremote. But today I accidentally pushed my commits to theoriginremote. So is there any way to revert these commits from theoriginremote?.I have searched and tried a lot of ways but am only getting w... | How to remove commits from GIT origin? |
More recently,Bug 1575845in Red Hat's Bugzilla tracker shows a problem in RHEL/CentOS 7.3 or later that triggers this issue. Something with dbus policy not being passed correctly. The permanent fix (for now) could be upgrading your base image to a newer version of RHEL/CentOS.However, these commands should also work, p... | This is what I got from status firewalld:firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: inactive (dead) since Tue 2015-07-14 02:58:35 UTC; 35s ago
Process: 19546 ExecStart=/usr/sbin/firewalld --nofork --nopid
$FIREWALLD_ARGS (code=exit... | Centos7 firewall not running |
DescribeInstances API is the one you are looking for. It returns the VPC ID of instance.
|
I am trying to find out the vpc-id of an instance. Can anyone refer to an API that would work this out? Im using the java sdk.
| EC2: How can I get the Vpc ID of an Instance? |
Inside the function insert_node in the else statement
else {
struct Node *temp = list.head->next;
while (temp != NULL)
{
temp = temp->next;
}
temp = new_node;
}
there is changed the local variable temp that is not connected to the list.
You need to write
els... |
I'm creating a linked list and somewhere down the ladder I am not properly assigning the addresses to chain them together.
There is no compile time error, but a mistake in my code becomes apparent when I try to print the list.head->next node. The print result is an address of 00000000.
Why is list.head->next not being... | Linked Lists - What can cause an address allocated with malloc to never actually be assigned? |
The issue was solved by usingpm2 startOrReload current/ecosystem.config.js --only Developmentrather thanpm2 startOrReload current/ecosystem.config.js --only ProductionShareFollowansweredMay 23, 2022 at 17:38kissukissu42.7k1515 gold badges7575 silver badges151151 bronze badgesAdd a comment| | I have a Nuxt SSR app which want to deploy on server. My CI (Buddy) runs pipeline to do it by running bash commands. All of them runs without any error but at the end application can not find files in .nuxt directory. It throws an error 404 not found _nuxt/46f6559.modern.jsEverything looks ok except the file really doe... | Nuxt SSR application can not find some files generated by pipeline |
Prometheus already has a .Net Framework package.Seehttps://github.com/prometheus-net/prometheus-netNuget package for ASP.NET Web API middleware on .NET Framework: prometheus-net.NetFramework.AspNetInstall-Package prometheus-net.NetFramework.AspNet | I've found a lot of NuGet packages for ASPNetCore-targeted Prometheus metrics exporters, but I can't find a single one for the "old good" ASP.NET WebAPI.I need a client library somewhat similar to Prometheus.Client or prometheus-net that can register the end-point among other WebAPI controllers and expose the metrics g... | Prometheus client library for ASP.NET WebAPI |
You have to usepython -m pipto make it use the pip within your environment. Using pip without the-mflag might be pointing it to the global pip install. | I have written a python packagepackagewhich is hosted on github and I would like to install it in a new virtual environment on my pc. It is the simplest package possible:package
├── README.md
├── pkg
│ └── __init__.py
│ └── main.py
├── setup.pyI tried to install it using the following lines(my_venv) C:\venv\my_venv... | Can't pip install package from github in virtual environment |
The SSL certificate is presented by the server and not the ELB [TCP pass threw].If you are using TCP pass through, then no, it doesn't matter what the certificate looks like. The ELB is just forwarding the raw TCP data. When using TCP->TCP the ELB doesn't really even know that the traffic is SSL. | Background:I have an IIS application running behind a AWS ELB. The SSL certificate is presented by the server and not the ELB [TCP pass threw].Question:Does the ELB have to trust the Certificate presented by IIS? | AWS ELB Server certificate trust |
Sorry for late reply.
From viewing you code i can say that .
ksymbol = find_symbol(sym, &mod, NULL, true, false);
You are assigning to a constant. which can result in error.
But otherwise can you post the error.
|
Good afternoon SO-
First time using kmallocs and kfrees, and I'm running into errors.
struct module* mod;
const struct kernel_symbol* ksymbol;
ksymbol = kmalloc(sizeof(struct kernel_symbol), GFP_KERNEL);
if(!sym | !dst | (dst_sz <= 0)) return -EFAULT;
mutex_lock(&module_mutex);
mod = (struct module*)kmalloc(sizeof(... | Using kfree on kernel modules |
Is a Pod the same as VM instance inside my cluster, or can multiple
Pod's run inside a single VM instance?Multiple Pods can run the same instance (called node in kuberenetes). You can define maximum resources to consume for a POD in the deployment yaml. See thedocs. This is an important prerequisite for autoscaling.A... | I have deployed an app using Kubernetes to a Google Cloud Container Engine Cluster.I got into autoscaling, and I found the following options:Kubernetes Horizontal Pod Autoscaling (HPA)Asexplained here, Kubernetes offers the HPA on deployments. As per thedocs:Horizontal Pod Autoscaling automatically scales the number of... | Kubernetes vs Google Container Engine: How to use autoscaling? |
You can configure it in the organisation settings under Member privileges. The option is named Base permissions.
You can also access it under https://github.com/organizations/<organisation name>/settings/member_privileges.
By default, organisation members have no permissions in repositories created by other organisat... |
We are group of developers who have a joint organisation on GitHub.
When we create a repository for the organisation on GitHub it is only the creator that is made admin and read, write, and maintainance rights are not given to the organisation, nor the organisation team.
We have to go to Settings => Manage Access ever... | Creating github repository for organisation assign maintainer admin rights only to the creator |
try this configuration filefiles:
"/home/ec2-user/install-oracle-jdk.sh":
mode: "000755"
owner: ec2-user
group: ec2-user
content: |
#!/usr/bin/env bash
wget -O jdk-7u25-linux-x64.rpm --no-cookies --no-check-certificate --header 'Cookie:gpw_e24=http://www.oracle.com; oraclelicense=accept-se... | Has anyone one come up with a good config script to install Oracle Java 1.7 in to an Elastic Beanstalk instance using the config files stored in.ebextensions. I am using a tomcat7 version of elastic beanstalk and I was able to install openJDK with yum using the following:packages:
yum:
java-1.7.0-openjdk: []
... | How to install Oracle Java 7 in an Amazon Elastic Beanstalk instance |
Cron jobs run without any environment, including a current directory. That means that you'll need to use the full path to any files that you want to work with.If you add a valid email address at the top of your crontab:[email protected]you'll get any output the cron job does sent to your email. This includes error me... | This question already has answers here:Crontab - Run in directory(2 answers)Closed9 years ago.I have a php script that sends out a email report with an attached pdf document. I use fopen. If I call the php file manualy it works without any problems and the mails are beeing send as expected.But:
If the same file should ... | PHP fopen can not read file if called with cronjob [duplicate] |
managing network interfaces usualy require administrative rights, so you have to run your script in an elevaled powershell console. | What I am trying to accomplish:I am trying to set the DNS address on my machine using powershell.Here is my code:$dnsserver = (,"192.168.0.5")
Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE | Invoke-WmiMethod -Name SetDNSServerSearchOrder -ArgumentList (,$dnsserver)I am using this as refe... | Set DNS with PowerShell |
Yes, your assumption is correct.The 2GB limit applies to each object individually. The total memory used for all objects can exceed 2GB.(Whether the runtime is able to allocate enough memory for your requirements is another matter. I doubt if it could find a full 2GB of spare memory on a 32bit machine, but it shouldn't... | I've read (http://blogs.msdn.com/joshwil/archive/2005/08/10/450202.aspx) that the maximum size of an object in .NET is 2 GB.Am I correct in assuming that if I have an Object that takes up 256 MB Memory, since it is a reference type, I can have an array of these 256 MB Objects where all the objects together may takeup >... | .NET Max Memory Use 2GB even for x64 Assemblies |
You're mistaken about how security groups work. When you choose to allow an SG as the source in a rule for another SG, you're saying that any EC2 instance that is a member of that SG is permitted on the port you specify. It is not related to the rules of the source SG.I understand that you're trying to specify all the ... | In EC2-classic, I've been trying to use a security group as the source for another security group, to allow access from multiple IPs (work and home). The way I've been trying is to make a security group named 'my_ips' with one rule for each of my ip numbers (as CIDR), open for all TCP ports. Then I configure a securi... | EC2: Allowing multiple IPs for a security group rule |
Any FILE* pointer that is fopen()'d must be fclose()'d. Any dynamic memory that is malloc()'d must be free()'d.
So yes, in general, you need those calls, BUT only when used correctly! Which this code is not doing.
If fopen() fails, an int is thrown, and then the exception handler is exhibiting all kinds of bad/illega... |
I'm a C++ newbie, so I don't truly understand how C++ manages memory. Isn't this code redundant?
void processData()
{
FILE* savedDataFile;
char* savedData;
try {
savedDataFile = fopen("../savedData.dump", "r");
if (!savedDataFile)
throw 0;
savedData = (char*)malloc(0xf00... | Isn't this code redundant taking into account C++ memory management? |
Looks like you like to enableMultiViewsOptions +MultiViews | How can I allow my Apache server to return 300 Multiple Choices responses? It would have to be done using .htaccess and using a PHP page as the error page.So far I got this:ErrorDocument 300 "/300.php"The valid URL beinghttp://www.example.com/index.htmland the test URL beinghttp://www.example.com/index.php. When I use ... | HTTP 300 Multiple Choices on Apache Server |
When I list nvprof'smetricswithnvprof --query-eventsThat isn't consistent usage (emphasis added).Usingnvprof(ornvvp),eventsandmetricsarenot the same thing.To query events, you would use:--query-eventsTo query metrics, you would use:--query-metricsTo profile, asking for an event measurement, you would use--events name_o... | When I list nvprof's metrics withnvprof --query-eventsI see:thread_inst_executed: Number of instructions executed by the active threads. For each instruction it increments by number of threads, including predicated-off threads, that execute the instruction. It does not include replays.I would like to use this metric, ... | Why don't I get "thread_inst_executed" |
Instead of dropping the table, which, as you noted, would lose all the permission defitions, you couldtruncateit to just remove all the data, and then insert-select the old data:TRUNCATE TABLE country;
INSERT INTO country SELECT * FROM county_bkp; | I have created a backup for my country table.create table country_bkp as select * from country;What SQL should I use to restore thecountrytable to it's original state?
I can doinsert into country select * from country_bkp;but it will just have duplicate entries and probably fail as primary key would be same .Is there a... | Revert backup table data to original table SQL |
.NET provides built-in validation mechanisms when you connect to HTTPS resource. You can perform validation yourself as well, but proper validation is a complicated task that involves both local cryptographic operations and use of OCSP servers and CRLs. So I would suggest you to stay with default .NET validation unless... | When you develop a REST API client that talks over HTTPS you should validate that the certificate is the correct one to prevent man-in-the-middle attacks.The question is how to properly do this validation? (Ie validate the certificate chain?)Google is mentioning some validation anti-patterns here in a blog post titledC... | Proper way to validate a HTTPS certificate in a REST .NET client? |
If you want to print data from different datasource on the same panel in Grafana, then it's not possible natively.You'll have to create a panel for each datasource.However, it's possible to achieve this with the use of external tool such asthanosorCortex.Those tools allows you, among other things, to have a single entr... | We have multiple prometheus instances. But each of them might be missing some data.It would be great if there is a way to draw data from multiple prometheus instances on the same chart at the same time so that we can visualize the most complete set of our data.I have noticed that the Data Source type variable in Grafan... | Single Grafana chart drawing data from two prometheus instances at the same time |
There are actually couple things wrong here:I suspect you want to save.GlobalEnv, not justop's environment. However the calls tolswill list objects inop's environment (which is onlyiby the time you callls). If you want to list object in.GlobalEnv, callls(.GlobalEnv)Also, when you are callingsaveRDS, you are telling it ... | I need to save items in my environment in R to disk. I can't figure out why the following code doesn't work :op <- function(){
for(i in 1:length(ls())){
file <- paste0(ls()[i],".Rds")
saveRDS(file,file)
}
} | Trying to save everything in R environment to disk |
Your datastore operations should never time out. You need to fix this - most likely, by using cursors and setting the right batch size for your large queries.You can performinitialization of objects on instance startup- check if an object is available, if not - do the calculations.Remember to store the results of your ... | Good day,I am running a back-end to an application as an app engine (Java).
Using endpoints, I receive requests. The problem is, there is something big I need to compute, but I need fast response times for the front end. So as a solution I want to precompute something, and store it a dedicated the memcache.The way I di... | Google app engine API: Running large tasks |
I am from the engineering team and happy to help you here. I think the issue is not related to the manifest as it looks correct to me. The error suggests that you may haven't provided a correct lambda ARN for pre or post labeling task. Please see this doc for more details:https://docs.aws.amazon.com/sagemaker/latest/dg... | I'm working on a supervised machine learning problem, and I am setting up a custom labeling task to send out to Amazon Mechanical Turk for human annotation.I have uploaded the data to AWS S3 in the json-lines (.jsonl) format as follows, pursuant to the instructions as specified in the AWS documentationhttps://docs.aws.... | MissingRequiredParameter: Missing required key 'FunctionName' in params |
A repo will only show up under the user or org that "owns" it.But what youcando is fork it. It essentially clones the repo into your account, with all the commits. Since contributor info is based on the commits, it will show the same contributor information.If you want to keep that data in sync as new commits are made ... | I contributed to one of my friend's public repo. How do I also display the same repo on my own Github page? I still want to keep the commit history as well as the list of contributors that shows on the repo page. | Displaying collaborated repositories on my Github |
4
The release event is useful here.
Since you want the event to run each time a new release is published, you can use the published activity type to filter out editing/deleting/etc...
on:
release:
types: [published]
You may also wish to consider adding the prerelea... |
on:
push:
tags:
- '*' # Push events to every tag
which I got from Trigger Github Action only on new tags?
I created this github action, thinking that it would run after a newly created tag.
So I pushed this on a branch, as .github/workflows/onnewtag.yml file.
Then, staying on this same branch, I ... | Run a github action after new tag creation |
You have to understand how kubernetes is interacting with cloud provider. Like for example previously I deployed the Kubernetes on AWS withkops. I see that kubernetes uses aws access key & access secret to interact with aws. If I remember correctly, I saw some CLI options inkube-proxyorkubeletto support AWS. (I have se... | I have a question around K8S Service Type "LoadBalancer".I am working on developing a new "Kubernetes As a Service" Platform (like GKE etc.) for multi cloud.Question is: K8S Service Type "LoadBalancer" works with Cloud Load Balancers (which are external to Kubernetes). GKE & other cloud based solution provides direct i... | How to integrate Kubernetes Service Type "LoadBalancer" with Specific Cloud Load Balancers |
2
One approach to this is to use the 'env_file' directive on the docker-compose.yml, in there you can put a list of key value pairs that will be exported into the container. For example:
web:
image: nginx:latest
env_file:
- .env
ports:
- "8181:80... |
I'm working with docker-compose for a laravel project and nginx.
This is my docker-compose.yml :
version: '2'
services:
backend:
image: my_image
depends_on:
- elastic
- mysql
mysql:
image: mysql:8.0.0
nginx:
depends_on:
- backend
image: my_image
ports:
- 81:80
So, my... | Docker compose, link file outside container |
The basic technique is to configure SSH with two new virtual (ie. fake) host names. They both point at github.com, but one uses one key and the other use the other. Your ssh config has a problem, it doesn't specify what the real host is.
# Second account
Host github.com-SECONDARY
User git
IdentityFile ~/.ssh/i... |
I want to use two different github accounts to separate my school and my personal things. So I found the methods here,(https://youtu.be/fnSRBRiQIU8)
I successfully added two ssh keys on each account and this is my ~/.ssh/config file
# Default account
Host github.com
User git
IdentityFile ~/.ssh/id_rsa
# Second... | How can I push git with multiple accounts on one machine |
Variables defined locally within the function will be automatically released at the end of the function scope. The destructors for any objects will also be called, which should free any memory allocated by those objects (if the objects were coded correctly). An example of such an object would be a std::vector.
Anythin... |
I have a function which processes and stores a lot of data in it and then it returns the results as a vector of class. The amount of data stored in this function is tremendous and I want to clear the storage memory of the function after it finished its job. Is it necessary to do so (does the function automatically cle... | Clear the memory after returning a vector in a function |
You generally want your new certificate to have a validity period beginning some time before the end of validity of the old one. That way, you have the time to change the SSLCertificateFile (and SSLCertificateKeyFile if needed), do a graceful reload and test. If something does not work fine, you can do a rollback (as t... | What is the best practice to make a switch from last year's SSL certificate to the next year's? Is it possible to declare both certificates in the enabled site config for the same site/ip?If I have to make the switch manually the minute before cert expires, then are there any scripts or tips to make it automatic in Lin... | Best practice to switch apache2 SSL to the next year's certificate |
TheSonarQube Scanner for Mavenis not a plugin, it's a scanner. That's why you don't need to deploy it inextensions/plugins, as per theFile is not a plugin. Please delete it and restart..error.Your other error:[ERROR] Failed to execute...: An API incompatibility was encountered while executing org.sonarsource.scanner.ma... | I am trying to upgrade my SonarQube from SN4.0 to SN5.5. I would like to use the maven scanner(sonar-maven-plugin-3.0.2.jar) so I can make use of the PDF report. Unfortunately, I am hitting "File is not a plugin. Please delete it and restart: sonar-maven-plugin-3.0.2.jar".I downloaded sonar-maven-plugin-3.0.2.jar athtt... | SonarQube: File is not a plugin. Please delete it and restart: sonar-maven-plugin-3.0.2.jar |
Increase the memory via the SONAR_SCANNER_OPTS environment variable:export SONAR_SCANNER_OPTS="-Xmx512m"On Windows environments, avoid the double-quotes, since they get misinterpreted and combine the two parameters into a single one.set SONAR_SCANNER_OPTS=-Xmx512m | sonar bulild sucess
but analysis errorjava.lang.OutOfMemoryError: Java heap spaceset sonar.properties but not usesonar.web.javaOpts=-Xmx6144m -Xms128m -XX:+HeapDumpOnOutOfMemoryError
sonar.ce.javaOpts=-Xmx6144m -Xms128m -XX:+HeapDumpOnOutOfMemoryErro
sonar.search.javaOpts=-Xms512m -Xmx6144m -XX:+HeapDumpOnOutOfMemoryEr... | Setting the sonar file, sonar.properties, no useful after restarting the service |
If you have access to the WWDC 2009 videos, sessions 414: "iPhone Performance Optimization with Instruments" and 415: "Optimizing Performance on iPhone" both show how to analyze memory issues on iPhone.If you are a registered iPhone developer, you should also have access to the iPhone Tech Talk videos through the iPhon... | Are there good video tuts that show how to use this Object Alloc instrument to figure out if my objects and other stuff get freed from memory? Also, I have a bunch of C code and use Core Audio, so those are not really objects but still heavy in memory. Would like to know more about that Object Alloc instrument. | Are there video tutorials on how to analyze the memory footprint of an iPhone app? |
This property is available in version 1.6 (not yet released). I reverted the documentation to the proper workaround:http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin | I followed the instructions at this location.http://docs.codehaus.org/display/SONAR/SCM+Activity+PluginI have added this property to the sonar-project.properties file
sonar.scm.perforce.clientspec.name=ourClientNamewhen I ran the scan sonar interpreted the clientspec to be a contatenation of the clientspec and the host... | Has anyone successfully configured perforce clientspec for sonar scm plugin |
You have to log into the container, kill the process and restart it with the new settings, but you will lose them at next container restart!To make them persistent you should recreate the container with new ones,but that solution will work only you stored container data into external volumes. | I have a running Prometheus docker container. The command is/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheusI found the default DB only keep15 days data according to documenthttps://prometheus.io/docs/prometheus/latest/storage/Is there a way that I can add the --storag... | Update execute parameter on a running Prometheus container |
PHP is choking because it's running out memory. Instead of having curl populate a PHP variable with the contents of the file, use theCURLOPT_FILEoption to save the file to disk instead.//pseudo, untested code to give you the idea
$fp = fopen('path/to/save/file', 'w');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec ($... | I am downloading a CSV file from another server as a data feed from a vendor.I am using curl to get the contents of the file and saving that into a variable called$contents.I can get to that part just fine, but I tried exploding by\rand\nto get an array of lines but it fails with an 'out of memory' error.Iecho strlen($... | Manipulate a string that is 30 million characters long |
I would strongly recommend against it,JLS-3.8. Identifierssays (in part)The "Java letters" include uppercase and lowercase ASCII Latin lettersA-Z(\u0041-\u005a), anda-z(\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or\u005f) and dollar sign ($, or\u0024).The$sign should be used only in mechanica... | This question already has answers here:What is the meaning of $ in a variable name?(2 answers)Closed7 years ago.While I was going through one project I found some strange variables names. Sonarqube gaves me Code Smell statements about these variables.For exampleprotected String value$editedby$java$lang$String;And messa... | Is it proper way to set names of some variables using $ char? [duplicate] |
You can check this article comparing SAM and Serverless
The key differences listed on that page are as follows
The Serverless Framework is a framework that makes it easy to write
event-driven functions for a myriad of providers, including AWS,
Google Cloud, Kubeless and more. For each provider, a series of events... |
We are working on project, we are tring to build serverless application in nodejs. I come terms across AWS SAM and Serverless. Which is best for implementing serverless application
| What's the difference between AWS SAM (Serverless Application Model) and serverless framework? |
I ended up using this project - Ofeliahttps://github.com/mcuadros/ofeliaso you just add it to your docker-composeand have config like:[job-exec "task name"]
schedule = @daily
container = myprojectname_1
command = python ./manage.py clearsessions | What's the best practices for running periodic/scheduled tasks ( like manage.py custom_command ) when running Django with docker (docker-compose) ?f.e. the most common case -./manage.py clearsessionsDjango recommends to run it with cronjobs...But Docker does not recommend adding more then one running service to single ... | Django + docker + periodic commands |
You cannot create a new repository on GitHub using only the git commandline, for that you should use GitHub's own CLI: https://cli.github.com/manual/gh_repo_create
gh repo create My_Tableau_projects
You can then set the origin of your repo to the github URL and push to it, essentially following the steps in this arti... |
Can anybody walk me through posting my new repository on Github?
I have tried to initialise git again in a folder different to the one I used before.
So I created a new folder on my Windows computer, My_tableau_projects. I have two files in it.
Then I ran
$ git init
$ git add .
$ git commit -m "first commit"
$ git ... | How to correctly add my new repository to github - repository not found |
This is probably the most stupid thing i did.
The API to authenticate a user and download the git repository is
GitHub API for Java (org.kohsuke.github)It has methods to connect using password, authorization token.GitHub github = GitHub.connectUsingPassword("Username","Password");
github.getRepository("Repository name... | I have to authenticate i.e basically check whether a user is there on Github for a public/private repository. If the user is a private user i have to authenticate the user using password and username. Is there any Java API that does all these in a simple and easy way? | Github User Authentication for public repositories |
Certain domain names (or suffixes) appear to be flagged for additional verification beyond the standard process.Additional Verification RequiredACM requires additional information to process this certificate request. To provide this information, use theSupport Centerto contact AWS Support. If you don't have a support p... | I requested a certificate for a subdomain similar to xxx.xxx.domain.edu but I get a message saying "The status of this certificate request is "Failed". Additional verification required to request certificates for one or more domain names in this request. Learn more.". Clicking Learn More does not provide any useful inf... | Amazon Certificate Manager .edu domain support |
the solution:I had to create a directory/usr/local/share/ca-certificatesand just put the certificate over there | i have a self signed certificate i generated earlier.
i installed it on my Ubuntu machine successfully.
what i did is:$ cp mycert.crt /usr/local/share/ca-certificates
$ update-ca-certificatesHowever, on my yocto machine:$ cp mycert.crt /usr/share/ca-certificates
$ update-ca-certificatesand the result is:Updating certif... | installing self-signed certificate Linux yocto |
No it is not 100% "safe", github can go down while you need to checkout the source, the author can delete the repository (or do some disrupting change to it) ecc. ecc.
With pip you can specify a revision or a tag together with the repository link
eg.
git+git://github.com/misterx/projectname.git@840d25bb9db9fbc801b9
th... |
It is possible to use pip to install from a git repo using command
pip install git+https://github.com/...
but is this safe for a production environment? Is there a way to protect from it being deleted without forking it, hosting myself, and merging any future updates?
| Is it safe to use pip with a git repo? |
Try thisRewriteEngine On
# Force https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If ... | Angular provides a default.htaccessfilein its documentation:RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html... | Force https:// with Angular's default .htaccess file |
Per my comment above, the solution was to use the@sign in theNamecolumn of GoDaddy, not the actual name of the domain that is owned. | I deployed my app and now I'm trying to add my custom URL. I followed Firebase's instructions and added their TXT record to my DNS (GoDaddy). But now Firebase is saying it's still not verified. I assume I'm doing something wrong, but there's not much here to mess up... | Firebase hosting not validating TXT record in GoDaddy |
after doing the restore do aALTER USER user1 WITH LOGIN = user1inside the restored DB, that will fix the mismapped SIDSee alsoDo you still use sp_change_users_login instead of ALTER USER UserName WITH LOGIN = UserName | I'm trying to move a database from one SQL Server database running on one machine to a another machine that is the test server and copy of the original.On the main machine, I took a backup of database myDB.
On the test machine, I deleted the existing older database myDB.
On the test machine, I restored the new databas... | SQL Server 2008 -- User not able to access restored Database |
2
I also came across this question. It is too bad that almost every blog post and article I find about this subject dutifully replicates the MSDN example without really explaining how it works.
I don't have a definite answer but I think this works because the page life cycl... |
I'm reading how to programmatically invalidate cached pages on the server in ASP.NET, and the book ("MCTS Self-Paced Traing Kit (Exam 70-515)") says:
To directly control whether a cached
version of a page is used or whether
the page is dynamically generated,
response to the ValidateCacheOutput
event and set a... | ASP.NET Caching - Programatically Invalidating Server Cache...confusion on example |
There is no downtime when updating a lambda function using the Serverless Framework, simply by runningsls deploy.The function code is zipped and uploaded to Lambda, and when that is completed, CloudFormation will update the Lambda configuration to point to the new code. There is no downtime in this process. | There is a following setup:2 lambda functions, deployed usingserverless.ymlcustom domain (e.g.api.mydomain.com) attached to API Gateway2 stages (devandprod)CNAME configuration in my domain to point toabcdefg.cloudfront.netThere's a high-level task to update two lambda functions without the downtime for the API that the... | How to update AWS lambda using serverless framework without downtime? |
The issue was resolved by specifying the correct port. :/ShareFollowansweredAug 19, 2020 at 22:21NeartCarpNeartCarp9711 silver badge1010 bronze badgesAdd a comment| | I have a web service based on Microsoft.Owin.Hosting running locally on port 8443 over https. I have bound a certificate to it and am able to connect using Chrome using the web server address https://localhost:8443/queryendpoint. I would like to call the web service however with a script running in a client browser p... | Calling Owin service running on localhost over https |
Go up to a parent directory of those files, and run git clean -f .
Note that, the files in question appear to be quite important, and it looks like you've initialized a git project in your home directory. Removing those files is a very bad idea, so use git clean at your own risk.
|
My untracked files when I type git -status will look something like this:
How can I clear the untracked files?
I tried git clean -f but it didn't work
| Git how to delete untracked files |
That error message is usually when the certificate format you pass to the command is not what it is expecting. The following command should solve it for you.openssl pkcs12 -export -out /Users/myname/fullchain.pfx -inkey /Users/myname/privkey.pem -in /Users/myname/fullchain.pemIt should prompt you to enter an export pa... | I am trying to use OpenSSL in the terminal. I have installed OpenSSL using brew install openssl. I want to convert a .pem file to another format that my hosting provider will accept.I have tried several different formulations of the code and plying the certificate from different places but none seem to work and all giv... | How do I use OpenSSL in the terminal to convert a .pem file to other formats? |
Rather than use the createsuperuser management command you can provide a fixture.
You'll need to provide a fixture for the auth.user model. For the password you can generate one via the Django shell
>>> from django.contrib.auth.hashers import make_password
>>> make_password('password')
Your final fixture should look ... |
Recently,I'm tring to deploy an application with docker.I get a problem about how to write a start script which will execute on Linux. An example is as fellow:
Usually,we create super user like this:
iMac:mysite yetongxue$ python manage.py createsuperuser
Username (leave blank to use 'yetongxue'): root
Email address: ... | How to create a superuser in Django with Linux shell script? |
You might be looking for the KubernetesWatch API.In fact, you make a List request (see API reference for e.g.Pods) and add thewatch=1query parameter to get a continuous stream of changes to the specified resources.kubectlalso supports watches with the-w/--watchflag:kubectl get myobjecttype -n <user-account-1> -w | I am working with kubernetes andkubectlcommands, and am able to get a list of namespaces, and then can get the resources inside those namespaces. Question is, is there aneffectiveway to monitor all resources (CRDs especially) in a certain namespace for changes? I know I could do this:kubectl get myobjecttype -n <user-... | Memory effective way to monitor change of Kubernetes objects in a namespace |
I see that you are trying to link codespace to some other repository that you own. But by default, Codespace limits access to only repository from which it was created.So you can either create a brand new codespace for your other repository.ORIf you want to access other repository from your existing codespace then you ... | I have created a github codespace that I attached (I think) to a particular github repository that I own. However, when I attempt to do a git push to the remote repo,
I'm getting the following error:remote: Permission to <username>/<reponame>.git denied to <username>.
fatal: unable to access 'https://github.com/<usern... | I am getting an error trying to do a git push to a repository in my github codespace |
Resolved using:get your applications certificate locally.
(on mac) Go to applications> keychain Access> System> Import your certificate.
Click on imported certificate, You will see Trust and Details heads for your imported certificate.
Elaborate Trust head and change permission to Always Trust.
Save your changes.
Refre... | Downloaded Edge version 84.0.522.59 on mac, while opening private sites getting error cert invalid and no option toproceed anywaywhile clicking advanced tab.This is to inform others, if someone face a similar kind of issue.Resolved using:get your applications certificate locally.(on mac) Go to applications> keychain Ac... | microsoft edge shows error cert invalid on accessing private applications |
Maybe I'm not understanding your question, but wouldn't it be possible for you to just catch OutOfMemoryException's thrown and call GC.Collect there? Toss the try/catch inside a loop that continues until you've finished your task and make sure it has the ability to clean itself up.
bool isFinished = false;
while (isF... |
Is there any way to get GC.Collect() to be called before throwing an OutOfMemoryException?
I suppose I'm looking for a way for it to do the following code flow:
Try to Allocate Memory
On Pass Return
Call GC.Collect()
Try to Allocate Memory
On Fail Throw New OutOfMemoryException()
I'm writing a caching implementation ... | Call GC.Collect Before Throwing OutOfMemoryException |
19
Check the docker commit usage parameters:
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
In fact, the example presented there shows how to do this:
$ docker commit c3f279d17e0a SvenDowideit/testimage:version3
f5283438590d
$ docker images
REPOSITORY ... |
I've made the images of Ubuntu 14:04, on my local laptop.
Then I want to commit images,
I run this command to commit
$ sudo Docker commit 2a1aef6a0547
However, there is no name on the repository and TAG
Like this, check images
$ sudo docker images
The results
REPOSITORY TAG IMAGE ID ... | Docker how to commit images with name on repository and tag |
Elastic Load Balancers do not support static IP addresses. They only support DNS CNAMEs (or Aliases if you are using Route 53). This is because ELB DNS entries will resolve to different IP addresses depending on how it is scaling between availability zones. Also, over time, the IP addresses will/may change.The AWS docu... | I have a load balancer configured to have an IPV4 Ip address. However, the provided IP is a DNS mapped IP address to the load balancer of the format *.ap-south-1.elb.amazonaws.com.I need to configure IOT devices to send data to the load balancer and they do not support DNS. How can I assign a static IP address like...t... | Adding a public static ipv4 address to an AWS load balancer |
1
I had the same issue, so I have created an automated process to move all Bitbucket Pull requests to Github issues.
https://github.com/mashayev/bitbucket-pull-request-migration
It will create the same PR with the same PR ID in Github with the below information:
Full Diff -... |
I want to import my bitbucket repo to GitHub with all active pull requests and I just tried GitHub import repo functionality but it not importing pull requests.
| How to import a repo along with its Pull Requests from bitbuket to github |
try using
profile_options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.placeholder)
.showImageForEmptyUri(R.drawable.placeholder)
.showImageOnFail(R.drawable.placeholder)
.cacheInMemory(true)
.cacheOnDisc(true)
.considerExifParams(true)
... | I'm trying to make an activity like the image below. On the imageview with the viewpager I load some random images and also on the smaller ones. When someone clicks on the smalls I update the views with new images. My problem is that when I click more than three times after update the views on one of the smalls I get a... | Android: Loading Large Images with Universal Image Loader |
I'm not a sysadmin guru, but if you have access to the server you can try thisCreate a new group called "webwriters" and add nobody and yourself to that group"chmod g+s webwriters" on the directory you write files"chmod 660" each file so that the owner and the group have write privilegesIf you don't have access to the ... | i have this problem with fopen files. Maybe someone has a solution...When fopen creates a file via the browser, the file is owned by "nobody", if i run the same script via crontab i get permission denied.
When the file is created by crontab, its owned by my cpanel username and then i cant fopen it via the web browser.S... | fopen the same file with apache and crontab - permission denied |
You may tryVertical Pod Autoscaler. It was created to address the same issue you have.You should also have some fancy graphs using Prometheus + Grafana. Graphs describe pods resource requests and limits as well as how much resources you have free in your cluster. Looking at "kubectl describe nodes" is not cool at all. ... | We run 8 microservices on k8s and i'd like to learn how to define what resource limits to use for my pods. This isn't that big of an issue when running on our cloud platform but I do like to test it locally as well.Currently, i'll just guess and allocate, sometimes i'll check how much they're consuming once they're run... | How do I determine resources required and set limits for applications running in k8s pods? |
You could use configMap for this. From application C create or update a configMap by calling kubernetes API using kubernetes go client library and volumeMount the configMap in service A and service B.The service A and service B can have a mechanism to check if anything has changed in those configMaps and if yes then re... | I am working on a building a distributed system where I need to refresh a particular configuration to all the pods of two services, service-A and service-B. This configuration is handled by another service-C. A user can send an api request to service-C which needs to be propagated to all the pods of service-A and servi... | Kubernetes : is it possible to broadcast message from one service to another service? |
Just push more commits on to the branch the request is for. The pull request will pick this up then.Example:If you want to have b merged into masterYou push c1,c2,c3 to bthen you make a new request for bit gets reviewed and you need more commitsYou push c11,c21,c31 to bThe pull request now shows all 6 six commitsShareF... | This question already has answers here:Preferred Github workflow for updating a pull request after code review(2 answers)Closed2 years ago.I've opened a pull request to a project. The maintainer has decided to accept it, but told me to modify some contents.How can I do it? Whether I should keep the commit hash unchange... | How to modify GitHub pull request? [duplicate] |
-1You have a different result because when comparing < and > to 0f you do make floating comparison but in the first example you do a float and an int comparison (so you are not strictly getting the result of a floating equality to 0). | We recently encountered something strange with one of the SonarQube rules during the validation of our C# code.
Floating point numbers should not be tested for equality (S1244)We understand why this rule exists and that we should correct the errors, but we can't figure out why some of our code is correct and other part... | Floating point numbers should not be tested for equality (S1244) triggered incorrectly for C# code? |
5
If you are using vue-cli with VueJS process.env is used by webpack in the build process to set the environment variables into your script when building for production. It will replace the process.env.VARNAME with the VARNAME value you specify on the .env and .env. files..... |
I recently started working in vue js and while trying to make run time url injection in vuejs app deployed using docker container in docker ucp, I came across window.ENV and window._env. I read about process.env to be used in order to use environment variables into application. But not sure how window.ENV or window._e... | window.ENV vs process.env vs window._env what is difference while using in vuejs apps? |
5
You can share a private repository with specific individuals by following the instructions here:
https://help.github.com/articles/inviting-collaborators-to-a-personal-repository/
Unfortunately, that doesn't let you pull in whole organisations at once.
You could move the r... |
I belong to two github organizations, let's say O1 and O2.
There is one private repository in O1 that can only be accessed by the people who belong to O1.
Is there a way I can share that repository with the people in O2?
I tried git clone --mirror but it looks like it's not automatically synced with the original repos... | Github: Share private repository with another organization |
I was having similar issues while setting up nginx reverse proxy forStorm-UIAfter digging for sometime, I got it working.server {
listen 80;
server_name example.com;
location ^~ /css/ {
rewrite /(.*) /storm-ui/$1;
}
location ^~ /js/ {
rewrite /(.*) /storm-ui/$1;
}
locat... | I have a 3rd-party ui server running in a docker container, exposed on port 8080.It seems to expect to load resources with an absolute path:http://localhost:8080/index.html,http://localhost:8080/js/some_jsfilesetc.I want to create a reverse proxy to it so it looks like it is coming from a different path:https://myserve... | nginx reverse proxy to a set of pages with an additional path in the URL based on http referer? |
This redirect code can either be added directly inside of the vhost file, or inside of a .htaccess file:RewriteEngine on
# rewrite to https.
# -----------------
# %{HTTP:X-Forwarded-Proto} !https: This condition checks if the X-Forwarded-Proto header is not set to https.
# The X-Forwarded-Proto #header is typically s... | How to I automatically redirect all non secure (http) pages to their https counterparthttp://example.com -> https://example.comBut only do this for browsers which support https. So that my website still works in older browsers? | Apache redirect to HTTPS when supported by browser |
Before converting to matrix, remove sparse terms from Term Document Matrix. This will reduce your matrix size significantly. To remove sparse terms, you can do as below:library(tm)
## tdm - Term Document Matrix
tdm2 <- removeSparseTerms(tdm, sparse = 0.2)
tdm_Matrix <- as.matrix(tdm2)Note: I put 0.2 for sparse just ... | I've got a large Term Document Matrix. (6 elements, 44.3 Mb)I need to covert it into a matrix but when trying to do it I get the magical error message: "cannot allocate 100 GBs".Is there any package/library that allows to do this transformation in chunks?I've tried ff and bigmemory but they do not seem to allow convers... | Convert Large Document Term Document Matrix into Matrix |
This post mentions(Oct. 11, 2013):I just realized Ghost is already supporting the GitHub-Markdown extension.So basically you can just include as for example Google Code Prettify by adding the following line below {{! The main JavaScript file for Casper }} into:/content/themes/casperdefault.hbs.<script src="https://goog... | I would like to know how to show line numbers in rendered markdown code blocks, and specifically how to do this for the Ghost blogging platform. Bonus if you can also have it color the code based on language (in a way similar to what GitHub and others do). Thanks! | Line numbers in Ghost code markdown blocks |
Git remotes are part of the local repository's configuration, not part of the repository itself -- they are not included in a clone.You could do this by writing and checking-in a script that, when run, sets up the desired remotes in your local repository, and then just remember to run it after cloning.ShareFollowanswer... | I have one gitlab / github remote repo for reviewing the code and I want to use Heroku as a second git remote url to deploy my app.It works fine when Igit remote add name urland thengit push name branchHowever:When I want to clone the repository on another computer from gitlab, all the remote urls are gone, just only t... | Remember multiple git remote urls after clone |
For anyone who has this problem the answer is simple - just add a fullstop after mailgun.org (mailgun.org.)Simplest things but when you don't know them they can be a real pain! | Really quick one - I am attempting to use mailgun for my email.One of the requirements is to add aCNAME = mailgun.orgI am attempting to do this via WHM - and can successfully create the record under 'Edit DNS Zone' for the domain.The problem is that it is auto-appending my domain name after the 'mailgun.org' entrySo wh... | CNAME and WHM - how to stop domain name being appended automatically |
Not sure the language you are using to code with, but regardless I am sure the strategy will work across the board. I pass an arbitrary value in the query string, something like a GUID or the datetime stamp. This will force a fresh load as the URL will be unique.
I use ASP.NET MVC which I then set a optional parameter... |
I'm having some trouble with the firefox and ie cache, on my website the user can make a query with a form, and this query returns a picture, but depending on which radio button is selected, it'll return a different picture, and it works just like that on chrome, but in IE and firefox, the same image is always returne... | Firefox and IE image cache |
This code is working. fflush(stdout) is enogh for printing.int sayHello()
{
printf("Haaaaaaaaaaaaai\n");
fflush(stdout);
return 0;
}But, aws lamda cannot print library prints directly on web console. We need to install awslogs for waching full logs.install awslogssudo pip install awslogsfor Waching logs.... | I tried to create a lambda function using node.js. w wrote code in C code and convert it to node library using node-gyp. lambda function perfectly working. but it print only node.js console.log statements.This is my node.js code'use strict';
console.log('Loading function');
exports.handler = (event, context, callback)... | Printf Statement not working on lambda |
In your Gemfile.lock, you can see which one of your dependencies pulls in those libraries, and what their version constraint is.
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
With Rails, loofah is required by rails-html-sanitizer and the version must just be greater than 2.0. If a version is locked, the Gemfile.lock... |
I have been receiving messages that GitHub found known dependency vulnerability in my Gemfile.lock, this is loofah (2.0.3) and Nokogiri (1.7.0.1) but these gems are dependencies I did not specifically asked for (other gems do depend on them) in my Gemfile, so, what can I do?
| Github found dependency vulnerability in Gemfile.lock |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.