View ssh_socks_proxy_setup.sh
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 | |
# socks over ssh tunnel | |
#----------------------------------------------------------------------------------------# | |
# ssh server set up # | |
#----------------------------------------------------------------------------------------# | |
# edit the sshd_config with nano as root | |
# sudo su |
View hdiutil.txt
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
hdiutil | |
Creating Internet-enabled Disk images | |
hdiutil internet-enable -yes /Path/to/image/myapp.dmg | |
burn an iso |
View sed_commands.sh
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 | |
# ============================ | |
# = Editing Files with 'sed' = | |
# ============================ | |
# 'sed' stands for Stream EDitor and is used to edit files automatically. It reads a file line by line, edits each line as directed by a | |
# list of commands, and spits out the changed line. 'sed' does a lot, much more than I can cover in this tutorial. A fuller tutorial on | |
# 'sed' will appear in an Advanced Lesson. | |
# |
View base64url.php
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
<!DOCTYPE html> | |
<html lang="en-GB"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Semantic html 5</title> | |
</head> | |
<body> | |
<img src="data:image/jpg;base64,<?php echo base64_encode(file_get_contents("image.jpg")) ?>" height="19" width="78" alt="base64" /> |
View MPlayer play files recursively in a directory.txt
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
MPlayer play files recursively in a directory. | |
I wanted to have my files played in alphabetical order and only avi files (since a couple .srt subtitle files were in there…), so I came up with this : | |
mplayer -playlist <(find "$PWD" -name "*.avi" -type f | sort) |
View Apache_rewrite_to_Amazon_S3.txt
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
<Directory "/www/sitename/folder/"> | |
<IfModule mod_rewrite.c> | |
RewriteEngine ON | |
RewriteRule ^(.*) http://bucktname.s3.amazonaws.com/folder/$1 | |
</IfModule> | |
</Directory> |
View curl_test_gzip_times.sh
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 | |
# ======================== | |
# = curl test gzip times = | |
# ======================== | |
# Time with Gzip: | |
curl http://www.example.com --silent -H "Accept-Encoding: gzip,deflate" --write-out "time_total=%{time_total}\n" --output /dev/null |
View ssh_relay_server.sh
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 |
View ffmpeg combine files.sh
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 | |
# ffmpeg combine seperate audio and video files into a single video | |
# copy the audio and video tracks | |
ffmpeg -i audio.aiff -i video.mov -acodec copy -vcodec copy -f mp4 avcombined.mp4 | |
# encode the audio as aac and copy the video track without encoding it. if its the h264 codec | |
ffmpeg -i audio.aiff -i video.mov -acodec libfaac -ac 2 -ar 48000 -ab 160k -vcodec copy -f mp4 avcombined.mp4 |
View install google chrome on debian.sh
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 | |
# install google chrome on debian | |
# download google chrome | |
# install the deb file | |
sudo dpkg -i google-chrome-stable_current_i386.deb | |
# you need to install libcurl3 |
NewerOlder