This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In .ssh/config: | |
Host target.host.domain target | |
User username_on_target | |
HostName target.host.domain | |
ProxyCommand ssh [email protected] nc %h %p | |
# The `nc` command should be installed on the gateway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user@home $ ssh -R 10000:localhost:22 target.machine.org | |
[email protected] $ ssh -p 10000 localhost # ssh to the home machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ifconfig eth0 down | |
$ ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx | |
$ ifconfig eth0 up | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/ssmtp/ssmtp.conf | |
AuthUser=username | |
AuthPass=Your-Gmail-Password | |
FromLineOverride=YES | |
mailhub=smtp.gmail.com:587 | |
UseSTARTTLS=YES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ setterm -blank 0 | |
$ xset -q | |
$ xset s off | |
$ xset -dpms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init: | |
seaf-cli init [-c <config-dir>] -d <parent-dir> | |
start: | |
seaf-cli start [-c <config-dir>] | |
stop: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BIN=~/bin | |
wget "http://mirror.ibcp.fr/pub/gnu/parallel/parallel-latest.tar.bz2" | |
tar -xjvf parallel-latest.tar.bz2 | |
cd parallel-20*/ | |
./configure | |
make | |
cp $(find src -executable | grep '/' ) $BIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -A new_layout | |
if [[ -z $1 ]] ; then | |
new_layout["fr"]="us" | |
new_layout["us"]="us_intl" | |
new_layout["us_intl"]="us" | |
else | |
new_layout["us"]="fr" | |
new_layout["us_intl"]="fr" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user1@localhost $ # Set the setuid bit on the executable | |
user1@localhost $ sudo chmod u+s /usr/bin/screen | |
user1@localhost $ ls -l /usr/bin/screen | |
-rwsr-xr-x 1 root screen 360952 Jan 18 2038 /usr/bin/screen | |
user1@localhost $ # Update your .screenrc | |
user1@localhost $ cat .screenrc | |
multiuser on | |
acladd bgates,lellison,gvanrossum,dknuth,dnorman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUT=$1 | |
ffmpeg -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -preset ultrafast -threads 4 -y -sameq $OUT |
OlderNewer