I hereby claim:
- I am estebistec on github.
- I am estebistec (https://keybase.io/estebistec) on keybase.
- I have a public key whose fingerprint is DD92 FC70 2457 D891 0CE7 DAB6 DEC1 C2F9 7E1A 8D95
To claim this, I am signing this object:
intToBinStr :: Int -> String | |
intToBinStr n = | |
let _shiftBits 0 s = s ++ "0" | |
_shiftBits 1 s = s ++ "1" | |
_shiftBits x s = _shiftBits (div x 2) (s ++ show (mod x 2)) | |
in _shiftBits n "" | |
main :: IO () | |
main = print $ intToBinStr 19 |
I hereby claim:
To claim this, I am signing this object:
# Update brew | |
brew update; brew upgrade; brew cleanup --force; brew doctor | |
# pythonz | |
[[ -s $HOME/.pythonz/etc/bashrc ]] && source $HOME/.pythonz/etc/bashrc | |
# Update setuptools, pip, and virtualenvwrapper | |
pip install -U pip setuptools virtualenv virtualenvwrapper cookiecutter | |
# Setup virtualenvwrapper |
svn status | egrep '^\?' | cut -c8- | xargs rm -fr |
var a = [1,2,3]; | |
a.hasNextPage = false; | |
console.log(a) | |
// [ 1, | |
// 2, | |
// 3, | |
// hasNextPage: false ] | |
// Uh oh... |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Polyfill | |
if (!Array.prototype.forEach) | |
{ | |
Array.prototype.forEach = function(fun /*, thisArg */) | |
{ | |
"use strict"; | |
if (this === void 0 || this === null) | |
throw new TypeError(); |
from collections import namedtuple | |
PersonTuple = namedtuple('PersonTuple', ['formal_name', 'preferred_name']) |
(function(export) { | |
var symbolComplements = { | |
"A": "T", | |
"T": "A", | |
"C": "G", | |
"G": "C" | |
}; | |
export.DNA = { | |
complementStrand: function(strand) { |
# Freshen homebrew | |
brew update | |
brew upgrade | |
# The main stuff we need | |
brew install postgresql | |
brew install postgis | |
brew install gdal | |
# Switch to postgis version 1.5.3 - 2.0 not supported yet |
# For anyone random finding this, yeah, I don't like Django performing the extra query to determine insert vs. update | |
class BaseModel(models.Model): | |
id = models.CharField(primary_key=True, max_length=512) | |
created = models.DateTimeField(auto_now_add=True) | |
updated = models.DateTimeField(auto_now=True) | |
version = models.IntegerField(default=1) | |
class Meta: | |
abstract = True |