Skip to content

Instantly share code, notes, and snippets.

View koirikivi's full-sized avatar

Rainer Koirikivi koirikivi

View GitHub Profile
@koirikivi
koirikivi / .vimrc
Created February 17, 2014 12:11
Messy vimrc
" Based on http://www.derekwyatt.org/vim/the-vimrc-file/the-absolute-bare-minimum
" Also lots of other sources and personal experimentation
execute pathogen#infect()
" Forget being compatible with good ol' vi
set nocompatible
" Comment color more readable
hi Comment ctermfg=darkgray
@koirikivi
koirikivi / gist:9090176
Created February 19, 2014 11:24
Django-CMS uWSGI bug
Traceback (most recent call last):
File "/vagrant/venv/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/vagrant/venv/lib/python2.6/site-packages/django/core/handlers/base.py", line 47, in load_middleware
mw_class = import_by_path(middleware_path)
File "/vagrant/venv/lib/python2.6/site-packages/django/utils/module_loading.py", line 26, in import_by_path
sys.exc_info()[2])
File "/vagrant/venv/lib/python2.6/site-packages/django/utils/module_loading.py", line 21, in import_by_path
module = import_module(module_path)
File "/vagrant/venv/lib/python2.6/site-packages/django/utils/importlib.py", line 40, in import_module
@koirikivi
koirikivi / id_rsa.pub
Created August 11, 2015 08:37
public key
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAlXcU+KcIhU5OoaekS7ei71GVfaFqrwllq1ClqSzlm8fF3Hqe8qORTNN6uZmIVeK/ojUuaWwKrx+uxZoWmLv7p/HqrN785G4xuSu8tUSB0P7euHUiHh/sTbBJaai6qR76i8jCfsiKrhyi1fDhddRFpR+wTGawy3qD6iaCMDPqdjU34VuXv/ZRpwMSeXAp6gk0LT1jOjdG26vLCNsVLi6SR0VNLQVOL9Mg0t6S+R7Omir+rgXBQWfAe5zltwkEZiIm4WZ2Phw3rY6uQ5X8MqjajmhFe9s6Gg6BsmgWfYl/qqFziWWGY+goel6LfMre8L//rpfdMqq7zbZ27+fzHqhWpQ== rsa-key-20130125
@koirikivi
koirikivi / gist:7251853
Created October 31, 2013 15:36
something something
str(pi)[4814:4818]
function polyFillBgFixed($this, imgWidth, imgHeight, paddingTop) {
var paddingTop = paddingTop || 0,
thisHeight = $this.height();
$this.css("background-attachment", "scroll");
setInterval(function() {
var $window = $(window),
thisTop = $this.offset().top + (paddingTop || 0),
windowBottom = $window.scrollTop() + $window.height(),
w = $window.width() / imgWidth;
y = (windowBottom - thisTop) / ($window.height());
watch:
options:
livereload: true
spawn: false
watch:
sass:
files: 'sass/*.scss'
tasks: 'compass:compile'
options:
livereload: false
execute pathogen#infect()
set wildignore=.venv,venv,node_modules
" Simplified stuff
nmap ,x :!python %<cr>
" Based on http://www.derekwyatt.org/vim/the-vimrc-file/the-absolute-bare-minimum
" Forget being compatible with good ol' vi
set nocompatible
#include <stdio.h>
int main() {
int test = 1;
if (test == 1)
{
printf("Test passed!\n");
}
else;
### Keybase proof
I hereby claim:
* I am koirikivi on github.
* I am koirikivi (https://keybase.io/koirikivi) on keybase.
* I have a public key ASCccGJ9jSXEti0O44INgzyD4PfHpPEOBkvJOXRIc5hmuwo
To claim this, I am signing this object:
x = 2;
if(x % 2 == 0): {
print("x is even")
}
else: {
print("x is odd")
}