Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Kot nathankot

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am nathankot on github.
  • I am nathankot (https://keybase.io/nathankot) on keybase.
  • I have a public key whose fingerprint is 31D7 2685 C469 B74B 28CE 129B 3F37 322C FA01 901B

To claim this, I am signing this object:

View gist:6482433
/* Layer 3: Mouse mode
* ,-----------------------------------------------------------.
* |FN0| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
* |-----------------------------------------------------------|
* |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs|
* |-----------------------------------------------------------|
* |Contro| | | | | |McL|McD|McU|McR| | |Return |
* |-----------------------------------------------------------|
View gist:6482424
static const uint16_t PROGMEM fn_actions[] = {
[2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC) // LControl with tap Esc*
};
View 2013-09-05-modding-the-happy-hacking-keyboard.c
/* Layer 4: Numpad mode
* ,-----------------------------------------------------------.
* |Esc| | | | | | | | | | | | | | |
* |-----------------------------------------------------------|
* |FN0 | | | | | | 7 | 8 | 9 | = | | | |Backs|
* |-----------------------------------------------------------|
* |Contro| | | | | | 4 | 5 | 6 | + | | |Return |
* |-----------------------------------------------------------|
* |Shift | | | | | | 1 | 2 | 3 | - | |Shift | |
* `-----------------------------------------------------------'
View 2013-09-05-modding-the-happy-hacking-keyboard.c
/* Layer 2: Vi mode
* ,-----------------------------------------------------------.
* |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
* |-----------------------------------------------------------|
* |Tab | | | | | | | |PgU| | | | |Backs|
* |-----------------------------------------------------------|
* |Contro| | |PgD|FN0| |Lef|Dow|Up |Rig| | |Return |
* |-----------------------------------------------------------|
* |Shift | | | | | | | | | | |Shift | |
* `-----------------------------------------------------------'
@nathankot
nathankot / find_unused_functions.php
Created May 26, 2013
Symfony, Find unused functions
View find_unused_functions.php
#!/usr/bin/php -f
<?php
// ============================================================================
//
// find_unused_functions.php
//
// Find unused functions in a set of PHP files.
// version 1.3 - 08/20/2011
View gist:5611361
heroku addons:add pgbackups --remote staging
heroku addons:add pgbackups --remote production
heroku pgbackups:capture --remote production
heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging
@nathankot
nathankot / three-dee-text.stylus
Created May 19, 2013
Powerful Stylus mixin to create 3D text
View three-dee-text.stylus
three-dee-text($color = baseColor, $size = 7, $strength = 5%, $shadowing = .3)
$size = unit($size, '')
$text-shadow = '0 0 0 ' + rgba($color)
color $color
for n in 1..$size
$color = darken($color, $strength)
push($text-shadow, 0 unit(n, 'px') 0 $color)
push($text-shadow, 0 unit(n+1, 'px') unit(n - 1, 'px') rgba(0,0,0,$shadowing))
push($text-shadow, 0 unit(n+1, 'px') 1px rgba(0,0,0,.5))
View bootstrap-chef-solo.sh
#!/usr/bin/env bash
# Pre-requisites
apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
You can’t perform that action at this time.