Skip to content

Instantly share code, notes, and snippets.

@gauteh
gauteh / .gitignore
Created November 5, 2011 23:19
python script for starring and liking google reader items from exported json (used to migrate starred and liked items), check http://gaute.vetsj.com/greader for web app version.
*.json
*.xml
token*
oauth*
@rochacbruno
rochacbruno / haversine.py
Created June 6, 2012 17:43
Calculate distance between latitude longitude pairs with Python
#!/usr/bin/env python
# Haversine formula example in Python
# Author: Wayne Dyck
import math
def distance(origin, destination):
lat1, lon1 = origin
lat2, lon2 = destination
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@jnagels
jnagels / AndroidManifest.xml
Created January 6, 2014 10:01
Building with Android Gradle Plugin 0.7.+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<!-- {packagename} will be replaced by the actual packagename -->
<!-- Custom permission to safely send broadcasts between processes -->
<permission
android:name="{packagename}.permission.RECEIVE_BROADCASTS"
android:protectionLevel="signature"/>
@staltz
staltz / introrx.md
Last active July 25, 2024 16:52
The introduction to Reactive Programming you've been missing
@tclancy
tclancy / middleware.py
Last active August 23, 2023 05:28 — forked from acdha/middleware.py
Django middleware for Pympler
# encoding: utf-8
# Derived from Piotr Maliński's example with a few modifications to use logging and :
# http://www.rkblog.rk.edu.pl/w/p/profiling-django-object-size-and-memory-usage-pympler/
from pympler import muppy
from pympler.muppy import summary
from pympler.asizeof import asizeof
from django.conf import settings
import logging
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@clyang
clyang / gist:b3b2683d681c4db8deda
Created February 17, 2015 02:04
Installation Guide for Skicka on Ubuntu 14.04
** 僅在全新的Ubuntu 14.04下測試過 **
1. apt-get update && apt-get install golang git mercurial
2. cd && mkdir go
3. 編輯~/.bashrc檔, 把下列兩行加到底端: vim ~/.bashrc
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin
4. source ~/.bashrc
5. go get github.com/google/skicka
6. skicka init
@rbobbins
rbobbins / protocols.md
Last active June 11, 2024 22:11
Notes from "Protocol-Oriented Programming in Swift"

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control
@nsimmons
nsimmons / ReactNative-Deep-Dive.md
Last active October 9, 2023 07:48
ReactNative Deep Dive