Skip to content

Instantly share code, notes, and snippets.

@evoL
evoL / scrap
Created February 9, 2015 19:35
scrap — a simple manager of code meant to be used once
#!/usr/bin/env ruby
require 'pathname'
### Configuration begins here
SCRAP_DIR = '/Users/evol/.scraps'
EXTENSIONS = {
'rb' => 'irb -r $FILE',
'cpp' => 'g++ -std=c++11 $FILE; ./a.out',
'hs' => 'ghci $FILE'
@evoL
evoL / app_assets_i18n.js.erb
Last active August 29, 2015 14:10
Underscore-based, drop-in i18n-js replacement for Rails
//= depend_on_locale
I18n = {
translations: <%= I18n.backend.send(:translations)[I18n.locale].to_json %>
};
I18n.t = (function(source) {
var interpolationRegex = /%{([^}]+)}/g;
return function(path, data) {

Keybase proof

I hereby claim:

  • I am evoL on github.
  • I am evol (https://keybase.io/evol) on keybase.
  • I have a public key whose fingerprint is CC2B 3E9C 3F56 B70B 4DBC BD7F 1675 24D8 A7C3 1944

To claim this, I am signing this object:

@evoL
evoL / przepis.md
Created September 6, 2014 13:15
Ogórki w zalewie musztardowej

Ogórki w zalewie musztardowej

Zalewa na 1L wody

Zagotować:

  • 1L wody
  • 0,5 szklanki octu
  • 2 łyżki soli
  • 1 szklanka cukru
CABasicAnimation *animation = [CABasicAnimation animation];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
animation.duration = 0.66f;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
[contentViewLayer addAnimation:animation forKey:@"transform"];
contentViewLayer.transform = CATransform3DIdentity;
#!/usr/bin/env ruby
#-*- coding: utf-8 -*-
require 'open-uri'
require 'digest/md5'
class Napiprojekt
DOWNLOAD_URL = 'http://www.napiprojekt.pl/unit_napisy/dl.php?l=%s&f=%s&t=%s&v=other&kolejka=false&nick=%s&pass=%s&napios=%s'
ZIP_PASSWORD = 'iBlm8NTigvru0Jr0'
def initialize(file)
@evoL
evoL / bellman.cpp
Created March 9, 2013 22:13
Bellman-Ford
// Rafał Hirsz
// 247955
// KLO
#include <cstdio>
#include <limits>
#include <vector>
struct Edge {
int from, to;
Core was generated by `/usr/bin/spectrum2_libpurple_backend --host localhost --port 31264 --service.ba'.
Program terminated with signal 11, Segmentation fault.
#0 0x00002b939f6f3c7d in vfprintf () from /lib/libc.so.6
(gdb) bt full
#0 0x00002b939f6f3c7d in vfprintf () from /lib/libc.so.6
No symbol table info available.
#1 0x00002b939f7ab70c in __vasprintf_chk () from /lib/libc.so.6
No symbol table info available.
#2 0x00002b939cafda0b in g_vasprintf () from /lib/libglib-2.0.so.0
No symbol table info available.
@evoL
evoL / gist:4551840
Created January 16, 2013 23:05
My public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmYUJIqJ8vFB3/MgYRYd1xtJ+FAMtD+JQmwrKkobp6AKlh/8FxdhZgjDFJB2indDZ6w/FRsocLZ5z+sUwTH3rKlMmlLHIyEBeXK9FDxuzBBXLKWqJ2fq7xuoyL9ki/bgEc4PnPS/HaAZHT9aN2uQcn9QNgulGCU8uimy6wGxytH81ADMHeTaafVH33a4tNe3IjTcvOhbE4sxxt6JeUjyhCEK4KjY0PbQ2G5V+hRQ8mCB8uFOVr5cLJMllRUdqM8kd+PKuhY/djNregGx+eRmQOG9108aDi866bcqGio/5M/pbno5T/V4GLZRhy5X/2X/h/s3UOFAtOYQmnlttxGuLuw== hirszdesign@gmail.com
#!/bin/bash
#### CONFIG
MC_PATH=/home/minecraft
SCREEN_NAME="minecraft"
USERNAME="minecraft"
MEMALLOC=512
JAR_NAME="craftbukkit.jar"