Skip to content

Instantly share code, notes, and snippets.

View kairichard's full-sized avatar
🧊
Building building cultures

Kai Richard Koenig kairichard

🧊
Building building cultures
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kairichard on github.
  • I am kairichard (https://keybase.io/kairichard) on keybase.
  • I have a public key ASDhztS6-gBvdvV5li8rnIRATNb71ojWVfNEwzHGHeQa_wo

To claim this, I am signing this object:

@kairichard
kairichard / resources.md
Last active July 22, 2019 07:19
Understanding VIM
@kairichard
kairichard / .vimrc
Created July 17, 2019 10:05
A simple vimrc setting sane defaults
"""" Basic Behavior
set number " show line numbers
set wrap " wrap lines
set encoding=utf-8 " set encoding to UTF-8 (default was "latin1")
set mouse=a " enable mouse support (might not work well on Mac OS X)
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw screen only when we need to
set showmatch " highlight matching parentheses / brackets [{()}]
set laststatus=2 " always show statusline (even with only single window)
set ruler " show line and column number of the cursor on right side of statusline
def export(fname):
return fname
import unittest
from collections import defaultdict
from hamcrest import assert_that, equal_to, is_
class Command(object):
def __init__(self, bus):
self.bus = bus
def execute(self):
self.bus.emit("something")
apt-get install ruby
gem update --system
gem install lace
#as user kai
lace install https://github.com/kairichard/dotfiles.git linux
@kairichard
kairichard / carrierwave_tasks.rb
Created May 9, 2011 18:01 — forked from mrrooijen/carrierwave_tasks.rb
Rake Tasks for Carrier Wave for reprocessing versions.
##
# CarrierWave Amazon S3 File Reprocessor Rake Task
#
# Written (specifically) for:
# - CarrierWave
# - Ruby on Rails 3
# - Amazon S3
#
# Works with:
# - Any server of which you have write-permissions in the Rails.root/tmp directory
SELECT thr_node.name ,companies.name,(exp_parent.rating/(SELECT (COUNT(_parent.ind) - 1) AS _depth
FROM tree AS _node,
tree AS _parent
WHERE _node.lft BETWEEN _parent.lft AND _parent.rgt
AND _node.ind = node.ind
GROUP BY _node.ind
ORDER BY _node.lft
)) AS score
FROM
tree AS node
$.nyroModalSettings({
css:{content:{overflow:'auto'}},
hideContent:newsroomG3.nyroModal.animations.hideContent,
showContent:newsroomG3.nyroModal.animations.showContent,
hideBackground:newsroomG3.nyroModal.animations.hideBackground,
showBackground:newsroomG3.nyroModal.animations.showBackground,
resize:newsroomG3.nyroModal.animations.resize,
showTransition:newsroomG3.nyroModal.animations.showTransition,
hideTransition:newsroomG3.nyroModal.animations.hideTransition
});
newsroomG3.nyroModal.animations = {
showBackground: function(elts, settings, callback) {
elts.bg.css({opacity:0.75});
callback();
},
hideBackground:function(elts, settings, callback) {
elts.bg.css({opacity:0});
callback();
},
showLoading:function(elts, settings, callback) {