Skip to content

Instantly share code, notes, and snippets.

@traumverloren
traumverloren / switch-to-rbenv.md
Last active March 29, 2024 00:54
Switch from RVM to rbenv

Switch from RVM to rbenv:

Get Rid of RVM if it's installed:

rvm implode

Cleanup your .bash_profile/.bashrc/.zshrc file to remove RVM from the path:

You should have something like this left from RVM. Delete it from the file. ``[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"```

@abynim
abynim / Sketch Plugin Snippet - Managing Files.js
Last active April 30, 2024 10:02
Sketch Plugin functions for working with files.
var writeTextToFile = function(text, filePath) {
var t = [NSString stringWithFormat:@"%@", text],
f = [NSString stringWithFormat:@"%@", filePath];
return [t writeToFile:f atomically:true encoding:NSUTF8StringEncoding error:nil];
}
var readTextFromFile = function(filePath) {
var fileManager = [NSFileManager defaultManager];
if([fileManager fileExistsAtPath:filePath]) {
return [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];

Welcome to San Francisco!

Getting around town

Walk to Fisherman's Wharf by going down the hill and taking a left on Columbus. Or take a right to check out North Beach. We advise against taking taxis – instead, enjoy your first ride free on Lyft (use code STANFORD5) and Uber (use code nedzy).

Dining

Checking out

Cleaners will be coming at 2pm the day of your checkout. If you need to stay later, please coordinate with us. If you're heading to the airport, we suggest scheduling a ride on Wingz. Visit wingz.me/invite/223846 for $5 off your ride.

@tastycode
tastycode / globals.scss
Last active August 29, 2015 14:02
Common
@import "bourbon";
@import "neat";
@import "mixins";
html, body {
font-family: $font-proxima-nova;
font-size: $fs-root;
}
input, select, textarea {
@elidickinson
elidickinson / max_width_email.html
Created May 6, 2013 15:10
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@uhunkler
uhunkler / readTextFromFile.jstalk
Last active October 4, 2016 02:48
read and write TextToFile - JSTalk Sketch
/**
* Read text from a file at the given path
*
* @param {string} path given file path
* @return {mixed} string with text if successful, false if error
*/
function readTextFromFile( path )
{
var result = false;
@sdhull
sdhull / pre-commit
Created April 17, 2012 23:36
.git/hooks/pre-commit
#!/usr/bin/env ruby
file_names = `git diff-index --cached -Sdebugger --name-only HEAD`
file_names += `git diff-index --cached -Ssave_and_open_page --name-only HEAD`
file_names = file_names.strip
if file_names != ""
puts "The following files have 'debugger' or 'save_and_open_page' statements in them: "
puts file_names
raise "Please complete your merge prior to committing" unless ENV["FORCE"]
end
@sud0n1m
sud0n1m / gist:1917447
Created February 26, 2012 15:54
Docco install commands for Lion assuming homebrew and nothing else.
brew install python
### Add python to the path so OSX doesn't use system python
export PATH="/usr/local/share/python:${PATH}"
### Install pip to install pygments
easy_install pip
pip install --upgrade distribute
### Install pygments for syntax highlighting
pip install pygments
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';