Tag Archives: command line

cat: create/write file


Create file without replacing variables:

If you check /path/file you will see exactly the content above.
Create file REPLACING the variables while creating:

In this example, the variable ${0} will be replaced during the creation of the file, hence the content will display your username.



Verify that private key and SSL certificate are matching via command line

the outputs must match 🙂

GIT basic commands

Check branch

Show changes after your last commit

rollback to previous change (specific file) to the latest commit

Delete branch

Push new branch to the origin (my ‘git space’)

Restore file from upstream

Commit changes in one single line

If you want to merge the recent changes committed on the master branch into your dev branch

If you want to reset ALL from the version ‘on the web’

Source: http://rogerdudler.github.io/git-guide/

Docker basic commands

Check containers

Connect to a container

Exit from a container

Remove all of Docker containers:

SSL – Check if a certificate matches with its public key

Mac tricks – command line

Strange wake up of your Mac
To disable Bonjour (mDNSResponder – NoMulticastAdvertisements ):

To re-enable Bonjour:

Disable Creation of Metadata Files on Network Volumes


Save to Disk by Default and not on Cloud products

Power off memory during standy
hibernatemode supports values of 0, 3, or 25. Whether or not a hiberna-
tion image gets written is also dependent on the values of standby and

For example, on desktops that support standby a hibernation image will be
written after the specified standbydelay time. To disable hibernation
images completely, ensure hibernatemode standby and autopoweroff are all
set to 0.

hibernatemode = 0 by default on desktops. The system will not back memory
up to persistent storage. The system must wake from the contents of mem-
ory; the system will lose context on power loss. This is, historically,
plain old sleep.

hibernatemode = 3 by default on portables. The system will store a copy
of memory to persistent storage (the disk), and will power memory during
sleep. The system will wake from memory, unless a power loss forces it to
restore from hibernate image.

hibernatemode = 25 is only settable via pmset. The system will store a
copy of memory to persistent storage (the disk), and will remove power to
memory. The system will restore from disk image. If you want “hiberna-
tion” – slower sleeps, slower wakes, and better battery life, you should
use this setting.

It is suggested to power off memory at stand-by with the following command:

Source: http://docs.hardentheworld.org/OS/OSX_10.11_El_Capitan/

Time Machine – Change Schedule

To change Time Machine schedule to run every day, run the following from your Terminal:

Source: http://www.markwheadon.com/blog/2009/03/changing-time-machine-backup-schedule/

Banana Pi Pro – WLAN configuration

Add ‘ap6210‘ to /etc/modules to enable WiFi, and use modprobe ap6210 to force load the module.

Check dmesg to see if all has been loaded correctly. If not, reboot and check again.

Install the required packages:

Modify /etc/network/interfaces

Bring the interface up:

Source: http://oyox.de/882-wlan-auf-bananian-banana-pi-einrichten/