Skip to content

Instantly share code, notes, and snippets.

View jnv's full-sized avatar

Jan Vlnas jnv

View GitHub Profile

2011.03.10

Recursive Interfaces for Reactive Objects by Travers

Talks briefly about Kay's Vivarium Project... TODO: find out more

Frames

@maximilianschmitt
maximilianschmitt / readme.md
Last active August 29, 2015 14:19
Compiling your ES6 command line apps to work with node.js
@madrobby
madrobby / freckle_time_test.rb
Created October 25, 2011 15:45
Freckle accepted time formats (in API)
require File.expand_path('../../test_helper', __FILE__)
describe Freckle::Time do
it "should parse hh:mm" do
assert_equal 15, Freckle::Time.parse(':15')
assert_equal 15, Freckle::Time.parse('0:15')
assert_equal 60, Freckle::Time.parse('1:00')
assert_equal 60, Freckle::Time.parse('01:00')
assert_equal 660, Freckle::Time.parse('11:00')
assert_equal 150, Freckle::Time.parse('2:30')
@mlitwiniuk
mlitwiniuk / nginx_virtual_host
Created December 14, 2011 22:25 — forked from mrsweaters/nginx_virtual_host
Ruby on Rails server setup on Ubuntu 11.04 with Nginx, Unicorn, Rbenv
upstream example-workers {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a single worker for timing out).
server unix:/tmp/example.co.uk.socket fail_timeout=0;
}
server {
listen 80; # default;
server_name example.co.uk;
root /home/example.co.uk/website/public;
@josefslerka
josefslerka / gist:2344144
Created April 9, 2012 15:09
Wordlcloud pro Vodafone
library(tm)
require(wordcloud)
require(RColorBrewer)
# zde je treba vlozit korpus
# mydata.vectors <- character(0)
# mydata.vectors <- c("Dobre dopoledne Mateji,pokud jste pri registraci zvolil Moravskoslezsky kraj, zobrazila se vam v aplikaci informace, ze soutez probehne 30.1. Vcera 31.1. sef gangu navstivil Olomoucky a Zlinsky kraj. Zvoleny kraj naleznete v aplikaci v zalozce "Souboj kraju".Kazdopadne dnes hrajeme o 75 telefonu Samsung GALAXY mini. Online kolo zacina jiz ve 13:00.Drzim palce, Sandra, O2 Guru", mydata.vectors)
corpus <- Corpus(VectorSource(mydata.vectors))
corpus <- tm_map(corpus, tolower)
corpus <- tm_map(corpus, removePunctuation)
module AfterCommitCallbacks
def self.included(base)
base.send(:extend, ObserverCallbacks) unless base.respond_to?(:define_model_callbacks_for_observers)
[:create, :update, :destroy].each do |action|
base.send(:define_model_callbacks_for_observers, :"commit_on_#{action}", :only => :after)
end
base.send(:attr_accessor, :newly_created)
base.send(:before_validation, AfterCommitCallbacks::Handlers)
@whitequark
whitequark / gist:2622705
Created May 6, 2012 14:48
a piece of modern art
(3995:lookup-switch 3523 [3307, 3307, 3307, 3337, 3337, 3337, 3337, 3337, 3491, 3491, 3491, 3491, 3491, 3491, 3491, 3523]
(ternary
(3560:===
(3558:bit-or
(3555:lshift
(3551:integer 46)
(3553:integer 16))
(3556:integer 14))
(3559:get-local 3))
(3564:integer 0)
@jtsagata
jtsagata / Readme
Created July 12, 2012 00:27
Linux rails-footnotes sublime-text-2
copy handler to /usr/local/bin
copy desktop file to /usr/share/applications
sudo update-desktop-database
@Carreau
Carreau / slideshow.js
Created July 12, 2012 12:25
Slideshow mode of Notebook
<div id='presentation_mode'>
<style>
.pmode{ display: none !important }
</style>
<script>
grp=0;
pmode = function(){
init()
cells = $('.cell')
@antonio
antonio / 1.9.3-p286-perf
Created October 22, 2012 17:32
Ruby 1.9.3-p286 with the latest falcon patch
build_package_combined_patch() {
local package_name="$1"
{
curl https://raw.github.com/gist/3721565/falcon.patch | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1