start new:
tmux
start new with session name:
tmux new -s myname
server { | |
listen 80 default_server; | |
server_name domain.com *.domain.com; | |
root /srv/www/domain.com/public; | |
access_log /srv/www/domain.com/log/access.log; | |
error_log /srv/www/domain.com/log/error.log; | |
location / { | |
index index.php; |
# Linux | |
eval `ssh-agent` | |
ssh-add ~/.ssh/some_key_rsa | |
ssh user@server | |
# Mac | |
## As of the Leopard release of OS X, ssh-agent is more tightly integrated with Keychain. It is possible to store the passphrases of all of your SSH keys securely in Keychain, from which ssh-agent will read them on startup. The bottom line is that it is simple to secure your keys with passphrases, but never have to type the passphrase to use them! Here is how: | |
## Add the pass phrase to each ssh key to keychain: |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
#!/bin/bash | |
# This is a script to create a video from series of JPEG images | |
# Call it in a folder full of JPEGs that you want to turn into a video. | |
# Written on 2013-01-08 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
# Check <https://gist.github.com/4572552> for newer versions. | |
# Resources | |
# * http://www.itforeveryone.co.uk/image-to-video.html | |
# * http://spielwiese.la-evento.com/hokuspokus/index.html |
chrome.windows.getAll({populate: true}, function(allWindows) | |
{ | |
console.log(allWindows); | |
}); |
#!/bin/bash | |
# generate new personal ed25519 ssh keys | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.
As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin
and add the following group to the file /etc/cgconfig.conf
:
group browsers {
cpu {
# Set the relative share of CPU resources equal to 25%
cpu.shares = "256";
}