To limit for interface
sudo apt-get install wondershaper
In terminal find out what is the name of the interface connected to your internet by using
ifconfig. Could be eth0, eth1, eth2, etc... In my case is eth1. So, I would do this:
sudo wondershaper [interface] [dowload limit] [upload limit]
eg : sudo wondershaper eth1 1024 256
If you want to reset that do this
sudo wondershaper clear eth1
NOTE : This will limit entire speed of ysytem becasue , the limit applied to interface.
To limit the speed by application, we use below
sudo apt-get install trickle
sudo trickle -d [download limit] -u [upload limit] [application name]
eg : sudo trickle -d 120 -u 32 firefox
NOTe : Without application name it will apply to over all system.
Before we can install Jenkins, we have to add the key and source list to apt. This is done in 2 steps, first we’ll add the key.
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
Secondly, we’ll create a sources list for Jenkins.
echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list
apt-get install jenkins
Now that Jenkins is running, go to ci.company.net:8080. You’ll be welcomed by the default Jenkins screen.
When we are using cURL to retrieve a HTTPS site that is not using a CA-signed certificate, the following problem occurs.
SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html
To overcome this issue, follow the below steps
You might like to backup
/etc/ssl/certs before executing the command.
Check ssl path in OS
:~# openssl version -d
:~# cd /usr/lib/ssl && ls -al
:~# /usr/lib/ssl# cd certs
/usr/share/ca-certificates directory and add you self-signed certificate there, (ex: your.cert.name.crt)
:~# cd /usr/share/ca-certificates cp or create the crt/pem file here
/etc directory and edit the file
:~# cd /etc
:~# nano ca-certificates.conf
your.cert.name.crt to the file (
ca-certificates.conf) and save it.
Execute the program
:~# update-ca-certificates --fresh
you would have something like below
Clearing symlinks in /etc/ssl/certs...done. Updating certificates in /etc/ssl/certs....done. Running hooks in /etc/ca-certificates/update.d....done.
Test with curl on your target HTTPS site and it should work now.
To check the swap usage $ swapon -s
It's because of a lack of memory. You need to set up a swap mem manually as follow
sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k mkswap /swapfile swapon /swapfile
By default MAMP runs mysql in 8889 ports.
So change the env as DB_HOST=localhost:8889
$s3Client = \App::make(‘aws’)->createClient(‘s3’);
$bucket =[bucket name];
$key = [file name];
$command = $s3Client->getCommand(‘GetObject’, array(
‘Bucket’ => $bucket,
‘Key’ => $key,
‘ResponseContentDisposition’ => ‘attachment; filename="’.$key.’"’,
$request = $s3Client->createPresignedRequest($command, ‘+10 minutes’);
$signedUrlCannedPolicy = (string) $request->getUri();
echo "singed s3 url =>".$signedUrlCannedPolicy;
Note : you should have configured the s3 access key and secret key in config/aws.php