Skip to content

Instantly share code, notes, and snippets.

@goldsmith
goldsmith / python_mavericks_guide.sh
Last active December 25, 2024 20:56
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@mikedup
mikedup / gist:6981842
Last active December 25, 2015 13:09
Publet FJ temp styles
div.table-of-contents { margin-top: 17px; }
div.table-of-contents h1 { font: bold 40px serif; padding-bottom: 80px; text-align: center; text-transform: uppercase; }
div.table-of-contents h4 { color: #363636; font: italic 12px serif; margin-bottom: 0; margin-top: 50px; text-align: center; }
div.table-of-contents ul li { margin: 20px 0; }
div.table-of-contents ul li a { font: bold 20px serif; text-decoration: none; }
div.sep { background: #9A9A9A; height: 1px; margin: 30px 0; width: 100%; }
header { background: #323A45; left: 0; height: 50px; margin: 0 !important; position: fixed; top: 0; width: 100%; z-index: 51; }
header h1 { color: transparent; display: block; float: left; width: 10%; }
@max-mapper
max-mapper / cordova-loader.js
Created August 31, 2012 23:33
phonegap conditional script loader
// require this script before your document is done loading
;(function () {
var isDroid = navigator.userAgent.match(/Android/)
var isiOS = navigator.userAgent.match(/(iPhone|iPod|iPad)/)
var droidScripts = [
"script/cordova-android.js",
"script/android-utils.js",
"script/cdv-plugin-childbrowser-android.js",
"script/cdv-plugin-datepicker.js",
@pamelafox
pamelafox / header.html
Created August 8, 2012 04:51
Handlebars Design Prototyping
<html>
<head>
<style>
.w100percent {
}
.w1280px {
}
.w900px {
}
.w768px {
@Wilto
Wilto / demo.html
Created July 3, 2012 21:06
Hide and Tel
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="ie ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@nathansmith
nathansmith / percentage_grid.sass
Created December 30, 2011 19:24
Percentage Based "Grid"
// How I would approach a fluid grid:
//
// [1] Let the name reflect the % width,
// eliminating "1 of 12" guesswork.
//
// [2] Also, put 10px of padding to either
// side, to stack and make a 20px gutter.
//
// [3] Make the box-sizing = border-box, so that
// 50% + 20px total side padding = 50%, etc.
innerWidth / innerHeight tests @ http://sandbox.thewikies.com/orientation/
--------------------------------------------------------------------------------
Tested (14 devices, 28 browsers):
Droid 2 Global Android 2.2
iPhone 4 iOS5 (Safari, Opera Mini)
Motorola Atrix Android 2.3.4 (Stock browser, Dolphin, Skyfire, Opera Mini, Firefox)
Samsung Galaxy S9000 Android 2.3 (Webkit, Opera Mobile)
Samsung Galaxy Y Android 2.3.5
// `Clearfix
//--------------------------------------------------
// Can be added to other style rules via:
//
// #foobar
// @extend .clearfix
.clearfix:before,
.clearfix:after
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@netcarver
netcarver / sed_cleaner.txt
Created August 11, 2011 21:47
sed_cleaner -- with trigger guard.
# Name : sed_cleaner
# Version : 0.8.45
# Description : Does a little house cleaning on new installs.
# Author : Netcarver
# URL : https://github.com/netcarver/sed_cleaner
# Type : Admin only
# ......................................................................
# Revision : 08ad0b362fbe0908f8adaaaaf09f0863a76cbed5
# Branch : master
# ......................................................................