This file contains 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/sh | |
#-----------------------------------------------------------# | |
# ssh relay server # | |
#-----------------------------------------------------------# | |
# use a ssh server a middle man | |
# to connect 2 computers behind firewalls |
This file contains 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/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 |
This file contains 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/sh | |
# ===================================================== | |
# = REGENERATE A PUBLIC SSH-KEY USING PRIVATE SSH-KEY = | |
# ===================================================== | |
ssh-keygen -y -f id_rsa > id_rsa.pub |
This file contains 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/sh | |
# ============================================== | |
# = Using meld to compare directories over ssh = | |
# ============================================== | |
# Set up a ssh public private key and copy to your server | |
meld <(ssh 192.168.1.2 ls Desktop) <(ls Desktop) |
This file contains 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
========================= | |
= mac osx sshd location = | |
========================= | |
/etc/sshd_config | |
sudo su | |
mate /etc/sshd_config |
This file contains 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/sh | |
# this code goes in your .bash_profile | |
# change colour on ssh connections and then back to the default theme | |
function tabc { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi | |
osascript -e "tell application \"Terminal\" | |
set myWindow to front window |
This file contains 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
/*----------------------------------------------------------------------------------------*/ | |
/* squidman proxy set up */ | |
/*----------------------------------------------------------------------------------------*/ | |
install squidman | |
leave the port set to 8080 | |
This file contains 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/sh | |
# split files into chunk and rejoin with cat | |
# zip the file up first then split it, then rejoin it as a zip with cat | |
# that way when you unzip the file it keeps the original file name | |
# split -b (filesize in mb)80m file.avi splitprefix_ | |
split -b 80m somefile.zip file_ |
This file contains 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/sh | |
#-----------------------------------------------# | |
# software update from the command line | |
#-----------------------------------------------# | |
# To list the available software updates, use the following command. | |
sudo softwareupdate -l | |
# All available software updates can be installed with the following command: |
This file contains 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/sh | |
# sips resample images | |
sips --resampleHeightWidth 100 80 image.png | |
sips --resampleWidth 80 image.png | |
sips --resampleHeight 80 image.png |