Skip to content

Instantly share code, notes, and snippets.

@patrickgill
patrickgill / gist:c14a78094af4066b8b09
Last active September 10, 2015 08:07
Download all Samiyam songs from AngelP's youtube page
youtube-dl -x -o "%(title)s.%(ext)s" --match-title Samiyam -ciw ytuser:AngelPee91
@patrickgill
patrickgill / youtube.sh
Created April 12, 2015 05:51
download audio from youtube
#!/bin/bash
youtube-dl -x -o "%(title)s.%(ext)s" $1
@patrickgill
patrickgill / makedmg.sh
Last active August 29, 2015 14:19
Make a .DMG from a path
#!/bin/bash
# optional -volname "My Volume"
hdiutil create ${PWD##*/}.dmg -srcfolder .
@patrickgill
patrickgill / gist:128c7cb8a250e631f122
Last active August 29, 2015 14:19
Continue a broken download with wget and curl
#!/bin/sh
# url target
# wget
wget --continue $1 -O $2
# curl
curl -C - -L -O $1
@patrickgill
patrickgill / svnexportpath.sh
Last active August 29, 2015 14:19
SVN export a folder
#!/bin/bash
# usage svnexportpath.sh url
tree_master="tree/master"
svn export ${1/$tree_master/trunk} ${1##*/}
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install makepasswd rcs perl-doc libio-tee-perl git libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libfile-copy-recursive-perl build-essential make automake libunicode-string-perl
cd $HOME
git clone git://github.com/imapsync/imapsync.git --depth 1
cd imapsync
sudo make install
## Usage
# imapsync --host1 server1 -user1 user@server1 --password1 user1password --ssl1 --host2 server2 --user2 user@server2 --password2 user2password --ssl2
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Name : firmwhere
# Purpose : Lists and (optionally) downloads all iOS firmware updates
# Based on: https://gist.github.com/jordanmerrick/3447610
# -----------------------------------------------------------------------------
# set up a temporary file
file="$(/usr/bin/mktemp -q -t firmwhere)"
@patrickgill
patrickgill / createdmg.sh
Last active February 11, 2016 23:23
Create a DMG
# Use like this "createdmg.sh foldername"
if (( "$#" != 0 ))
then hdiutil create -volname $1 -fs HFS+ -srcfolder $1 -ov -format UDZO $1.dmg
else
echo "Error: a folder is required to create the dmg file from"
fi
#Disables photos.app
#
#chmod +x photosdisable.sh
#./photosdisable.sh
sudo chmod -x /Applications/Photos.app/Contents/MacOS/Photos