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
/Applications/Inkscape.app/Contents/Resources/bin/inkscape -z -e test.png -w 1024 -h 1024 test.svg |
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 | |
# Script used in XCode build phase to bring Carthage dependencies up to date | |
# Will check if the Cartfile is newer than the Cartfile.resolved, and if so | |
# Will bring the Carthage checkouts up to date | |
# If the checkouts are newer than the build | |
# Will bring the build up to date | |
# | |
# Derek Knight | |
# Jun 2016 |
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/bash | |
# Generate 3 images from the specified one | |
# takes two parameters" | |
# The image to be resized | |
# The new image base name | |
# The base image size | |
# Generates: | |
# A new image at the base size, this will be named <new image base name>.png | |
# A new image at 2x the base size, this will be named <new image base name>@2x.png |
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/bash | |
for i in `find . -name "*.png" -o -name "*.jpg"`; do | |
file=`basename -s .jpg "$i" | xargs basename -s .png | xargs basename -s @2x` | |
result=`ack -i "$file"` | |
if [ -z "$result" ]; then | |
echo "$i" | |
fi | |
done |
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
# List installed packages | |
dpkg --get-selections | |
# List the files in a package (e.g php5-gd) | |
dpkg -L php5-gd | |
# Update installed packages | |
sudo apt-get update | |
# Set up to use Gertboard |
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
if [ -f ~/.git-prompt.sh ]; then | |
source ~/.git-prompt.sh | |
fi | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
if [ -f ~/.bash-colours ]; then | |
source ~/.bash-colours |
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
if [ -f ~/.bash_aliases ]; then | |
source ~/.bash_aliases | |
fi | |
PS1="\h:${BRed}\u${White} \W${Black}\$(__git_ps1)${White} $ " |
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
# Assuming you have ruby (say 2.0) installed along with Rails (4.0) | |
# If you now want to set up Rails 3.2 as well, (for example to connect to SQL Server databses, which Rails 4.0 can't do) | |
# Set up rvm to use a different gemset (which in this case we will call Rails3.2) | |
rvm use [email protected] --create | |
# install Rails 3.2 in that gemset | |
gem install rails -v 3.2 | |
# list the available rvm gemsets |
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
# typically any app would have these controllers | |
rails generate controller welcome index | |
# Assume we want a controller for "posts", which would be a group of "post" models | |
# A post has a title whcih is a string and content, which is a text | |
rails generate controller posts | |
rails generate model Post title:string content:text | |
# Assume we want a controller for "comments" which would be a group of "comment" models | |
# A comment has a commenter, which is a string, a body which is a text and a post, which is a reference (to a post) |
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
# Create a repo on github. Assume it's called "MyRepo" and your git username is "gitUser" | |
# set up the current foder to be a git repo | |
git init | |
git add . | |
git commit -m 'Initial commit' | |
git remote add origin https://github.com/gitUser/MyRepo.git | |
git pull origin master | |
git push origin master |
NewerOlder