Skip to content

Instantly share code, notes, and snippets.

@mikedijkstra
mikedijkstra / ruby motion target simulator.md
Created October 9, 2013 00:33
RubyMotion: Target a specific simulator or iOS version on the fly

RubyMotion makes building and running your app in the simulator as easy as typing rake on the command line.

Sometimes to properly test your app you will need to target a specific simulator or iOS version. Luckily RubyMotion makes this easy to do on the fly.

To target a specific Simulator, run: rake retina=4

To target a specific iOS version, run: rake target=6.0

@mikedijkstra
mikedijkstra / xcode_select.md
Created August 31, 2013 05:52
Set which version of xcode should be loaded

sudo xcode-select --switch /Applications/Xcode.app/

@mikedijkstra
mikedijkstra / gist:5392032
Last active December 16, 2015 06:29
Download Postgres backup from Heroku

Make a backup: heroku pgbackups:capture or heroku pgbackups:capture --expire

Get the URL: heroku pgbackups:url

Download: curl -o latest.dump "URL"

Import: $ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump

@mikedijkstra
mikedijkstra / new_mac.md
Last active October 18, 2022 14:57
How to setup a new mac for Ruby on Rails development with MongoDB, Imagemagick and POW

Makre sure your home directory does not have a space in it or gcc will crap itself

1. Download and install Xcode

2. Install Command Line Tools (Xcode > Preference > Downloads)

4. Install Git

$ brew install git

@mikedijkstra
mikedijkstra / foundationBoxShadowHelper.css
Created August 1, 2012 18:18
Foundation: Box Shadow Helper
/**
* Box Shadow
*
* @category Foundation
* @package Helper
* @subpackage BoxShadow
*/
.bsis {
-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.25);
-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.25);
@mikedijkstra
mikedijkstra / social_share_links_wordpress
Created January 9, 2012 21:51
Social Share Links - Wordpress
@mikedijkstra
mikedijkstra / gist:1492191
Created December 18, 2011 02:39
Social Share Links

#SOCIAL SHARING LINKS

##Copy and paste the following into the HEAD of your page:

<style>
	#social_share span {display: inline; float: left; vertical-align: top;}
	#social_share span.title {font-weight: bold; font-size: 1.2em; margin-right: 10px;}
</style>

##Copy and paste the following where you'd like the share buttons to appear:

@mikedijkstra
mikedijkstra / git is easy
Created October 6, 2011 10:49
Git Workflow
# Git Workflow
1. Navigate to your sites folder with "cd ~/sites"
2. Clone your repo with "git clone <URL>"
3. Move into the repo with "cd <FOLDERNAME>"
4. Move onto the development branch with "git checkout development"
@mikedijkstra
mikedijkstra / new_laptop_setup.md
Created September 20, 2011 20:17
New Laptop Setup
  1. Install the following applications: Alfred App Chrome Dropbox Sublime Text 2 Xcode

  2. Add the following to ~/.bash_profile

Add git to the command line

@mikedijkstra
mikedijkstra / gist:1028393
Created June 15, 2011 23:31
New rails app using Mongoid
Create a new rails app
$ rails new [app_name]
Update your gem file to include mongoid and bson_ext
gem 'mongoid'
gem 'bson_ext'