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
@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 / gist:4175001
Created November 30, 2012 10:23
58 книг
Всем известный мультяшный персонаж Mr. Freeman составил список книг к прочтению. Хочешь мыслить шире, читай.
1.Данте Алигьери «Божественная комедия»
2.Аристотель «Политика»
3.Александр Афанасьев «Русские заветные сказки»
4.Ричард Бах «Чайка по имени Джонатан Ливингстон»
5.Александр Беляев «Продавец воздуха»
6.Энтон Бёрджесс «Заводной апельсин»
7.Михаил Булгаков «Великий канцлер»
8.Михаил Булгаков «Мастер и Маргарита» ☑
@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`
@2bj
2bj / gist:5480938
Created April 29, 2013 10:55 — forked from aku/gist:5466527
upstream backend {
server 127.0.0.1:3000;
}
server {
listen 80;
access_log /var/log/nginx/yoursite.access.log;
error_log /var/log/nginx/yoursite.error.log;
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@2bj
2bj / bookmarklet.js
Created May 30, 2013 10:03
twurlfix
javascript:jQuery('a.twitter-timeline-link').each(function(){$(this).attr('href', $(this).data('expanded-url'));});
if (Kohana::$environment == Kohana::TESTING)
{
Kohana::$is_cli = false;
}
else
{
echo Request::factory()
->execute()
->send_headers()
->body();
<?php defined('SYSPATH') OR die('No direct script access.');
/**
* Base session class.
*
* @package Kohana
* @category Session
* @author Kohana Team
* @copyright (c) 2008-2012 Kohana Team
* @license http://kohanaframework.org/license
*/