Skip to content

Instantly share code, notes, and snippets.

View 2bj's full-sized avatar
🏠
Working from home

Bakyt 2bj

🏠
Working from home
View GitHub Profile
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@2bj
2bj / bundles.sh
Created October 3, 2011 09:17 — forked from butaji/bundles.sh
This is how I manage my textmate bundles.
#
# This script will install the following Textmate bundles
#
# Languages
# - c https://github.com/textmate/c.tmbundle
# - coffeescript https://github.com/jashkenas/coffee-script-tmbundle
# - context free https://github.com/textmate/context-free.tmbundle
# - erlang https://github.com/textmate/erlang.tmbundle
# - haskell https://github.com/textmate/haskell.tmbundle.git
# - html https://github.com/textmate/html.tmbundle
@2bj
2bj / 00-README.TXT
Created March 5, 2012 06:24 — forked from bob-sims/00-README.TXT
Demo CommonJS module for Titanium Mobile interaction with Drupal Services 3.x REST + JSON interface
Tested using:
Drupal 6.24
Services 3.1
Titanium Mobile SDK 1.8.2 (Android 2.2 SDK)
Services module configured as this example:
http://www.tylerfrankenstein.com/code/android-app-with-drupal-7-services-phonegap-and-jquery-mobile
Special thanks to @grzegorzbartman (www.openbit.pl) for coaching and inspiration.
@2bj
2bj / .vimrc
Created March 5, 2012 06:31 — forked from shadowhand/.vimrc
" can haz highlights
syntax enable
" make love to my eyes
colorscheme Tomorrow-Night
" always show tabs
set showtabline=2
" enable recursive file search
@2bj
2bj / pre-commit
Created October 3, 2012 19:50 — forked from voldmar/pre-commit
git pre-commit hook that checks forgotten print’s and pyflakes errors
#!/bin/bash
cd ./$(git rev-parse --show-cdup)
result=$(mktemp /tmp/pre-commit.XXXXX)
STAGED=${STAGED:---staged}
changed_py=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.py$')
changed_js=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.js$')
[[ -z $changed ]] && exit 0
@2bj
2bj / Custom.css
Created October 7, 2012 22:47 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@2bj
2bj / appify
Created October 7, 2012 22:54 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@2bj
2bj / .gitignore
Created October 8, 2012 20:26 — forked from bergie/.gitignore
Node.js email handling examples
config.json
reading-image.png

Ever wondered how much who adds/removes, its time to find out :D (those are real stats, i just obfuscated the names )

###Results

Git scores (in LOC):
mr-add              :  +482273       -9466
justu               :  +286250       -159905
grosser             :  +152384       -323344

another : +121257 -82116

@2bj
2bj / notepad.html
Created January 30, 2013 21:07 — forked from jdkanani/notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`