Skip to content

Instantly share code, notes, and snippets.

@NapoleonWils0n
NapoleonWils0n / textmate 2 compile.txt
Created November 11, 2012 19:23
macosx: textmate compile Mountain Lion
textmate 2 compile
#-----------------------------------------------#
# autoconf
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar xzf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure
make
@NapoleonWils0n
NapoleonWils0n / terminal-notifier.sh
Created November 11, 2012 19:23
macosx: terminal-notifier
#!/bin/sh
#----------------------------------------------------------------------------------------#
# terminal-notifier #
#----------------------------------------------------------------------------------------#
# Installing Terminal Notifier
sudo gem install terminal-notifier
/*
|------------------------------------------------------------------------------
| Telephone and sipgate for phone on the mac with voice mail
|------------------------------------------------------------------------------
*/
Sipgate UK
www.sipgate.co.uk
@NapoleonWils0n
NapoleonWils0n / https_check_if_site_supports_ssl.sh
Created November 11, 2012 19:21
ssl: check if site supports ssl
#!/bin/sh
# https check if site supports ssl
openssl s_client -connect www.somesite:443
@NapoleonWils0n
NapoleonWils0n / vnc_over_ssh_tunnel.sh
Created November 11, 2012 19:20
ssh: vnc over ssh
ssh -f -q -L 5900:localhost:5900 192.168.1.9 sleep 10 && open vnc://127.0.0.1
@NapoleonWils0n
NapoleonWils0n / tar_over_ssh.sh
Created November 11, 2012 19:19
ssh: tar files over ssh
#!/bin/sh
tar cvpzf -/ | ssh user@host ""cat > /backup.tar.gz""
@NapoleonWils0n
NapoleonWils0n / ssh_socks_proxy_setup.sh
Created November 11, 2012 19:18
ssh: ocks over ssh tunnel
#!/bin/sh
# socks over ssh tunnel
#----------------------------------------------------------------------------------------#
# ssh server set up #
#----------------------------------------------------------------------------------------#
# edit the sshd_config with nano as root
# sudo su
@NapoleonWils0n
NapoleonWils0n / ssh_scp_copy_files.sh
Created November 11, 2012 15:59
ssh: scp copy files
#!/bin/sh
# ======================
# = ssh scp copy files =
# ======================
# scp file
scp ~/Desktop/filename.mysql [email protected]:/home/username/filename.mysql
# recursive scp
@NapoleonWils0n
NapoleonWils0n / ssh_remote_forward.sh
Created November 11, 2012 15:50
ssh: ssh remote forward
#!/bin/sh
#----------------------------------------------------------------------------------------#
# ssh remote forward #
#----------------------------------------------------------------------------------------#
# bind local port 80 to remote port 8080
# so you can go to the server on port 8080 down the tunnel to port 80 and the webserver
ssh -R 8080:localhost:80 -p 30000 username@sshserver
@NapoleonWils0n
NapoleonWils0n / ssh_afp.sh
Created November 11, 2012 15:46
ssh: self closing ssh tunnel for afp file sharing
#!/bin/sh
# self closing ssh tunnel for afp file sharing
SSHSERVER=192.168.1.2
ssh -f -q -L 1548:localhost:548 $SSHSERVER sleep 60 && open afp://localhost:1548