Skip to content

Instantly share code, notes, and snippets.

@romannurik
romannurik / DashboardLayout.java
Created March 23, 2011 05:06
A custom Android layout class that arranges children in a grid-like manner, optimizing for even horizontal and vertical whitespace.
/*
* ATTENTION:
*
* This layout is now maintained in the `iosched' code.google.com project:
*
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java
*
*/
/*
@amadamala
amadamala / collatz_sequences.py
Created April 29, 2011 14:11
Collatz sequence
N = 1001
def collatz_sequences(n):
while n > 1:
print n
if (n % 2) != 0:
n = (3 * n) + 1
else:
n = n / 2
print n
@asimihsan
asimihsan / google-reader-subscriptions.xml
Created May 13, 2011 08:59
Google Reader Subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Asymptote subscriptions in Google Reader</title>
</head>
<body>
<outline text="24in60.com" title="24in60.com" type="rss"
xmlUrl="http://www.24in60.com/feed" htmlUrl="http://www.24in60.com"/>
<outline title="android" text="android">
<outline text="Android Developers Blog"
@axelav
axelav / gist:1839777
Created February 15, 2012 22:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#