IT notes


Run show processlist every second: mysqladmin -uroot -p -i 1 processlist -i 1 stands for interval one second


Beside the OSI/model, there is also the TCP/IP Model: Link Layer Internet (IP) Layer Transport Layer Application OSI Model The OSI model has a bit more granularity. Physical Layer Data Link Layer Network Layer (IP) Transport Layer (TCP) Session Layer (TLS) Presentation Layer Application Layer (HTTP) TLS establishes an encrypted session. In the OSI model this is where TLS operates. It sets up its session, and adds a layer of encryption for the Application Layer (HTTP).


Change password password in irc: /msg nickserv set password <password>

combine two images

Combine in a single file 2 images: convert +append a.png b.png out.png -append will append vertically instead of horizontally (+)


To remove the blinking of symbolic links when doing ls in Linux: LS_COLORS="ln=35" export LS_COLORS That will set the ln=35 symbolic links to color purple. Params for LS_COLORS: di Directory fi File ln Symbolic Link pi Fifo file so Socket file bd Block (buffered) special file cd Character (unbuffered) special file or Symbolic Link pointing to a non-existent file (orphan) mi Non-existent file pointed to by a symbolic link (visible when you type ls -l) ex File which is executable (ie.


To create an htpasswd file (for htaccess “authentication”) using openssl: $ printf "foo:$(openssl passwd -apr1 PASSWORD)\n" >> .htpasswd If need to use crypt: $ printf "foo:$(openssl passwd -crypt PASSWORD)\n" >> .htpasswd


To create a git repository and access to it via ssh: $ ssh $ mkdir my-new-repo $ cd my-new-repo $ git --bare init To access your repo (clone it): $ git clone ssh://[email protected]:2222/~user/my-new-repo

self CA

Create a self signed CA (Certificate Authority) Generate private key: $ openssl genrsa -des3 -out CA.key 4096 To create a private key without password: $ openssl genrsa -out CA.key 4096 Create a root certificate: $ openssl req -x509 -new -nodes -key CA.key -sha256 -out CA.pem -subj "/" -days 365 In one single command create the private key and the certificate: $ openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout CA.

Bosh cheatsheet

BOSH is a project that unifies release engineering, deployment, and lifecycle management of small and large-scale cloud software. Check your environment: $ bosh env Set your deployment environment: $ export BOSH_DEPLOYMENT=foo if have multiple deployments in same dir better to use -d <deployment-name> since many commands are bound to this variable. To recreate your environment (virtualbox), remove the line that start with current_manifest from the file state.

ZFS swap

To add more swap on a ZFS system: # zfs create -V 64G -o org.freebsd:swap=on -o checksum=off -o compression=off -o dedup=off -o sync=disabled -o primarycache=none tank/swap2 To add it: # swapon /dev/zvol/tank/swap2 To resize you could first remove it: # swapoff /dev/zvol/tank/swap Then destroy it: # zfs destroy tank/swap