Talks briefly about Kay's Vivarium Project... TODO: find out more
This post has moved to my personal blog: http://maximilianschmitt.me/posts/compile-es6-command-line-apps/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy handler to /usr/local/bin | |
copy desktop file to /usr/share/applications | |
sudo update-desktop-database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='presentation_mode'> | |
<style> | |
.pmode{ display: none !important } | |
</style> | |
<script> | |
grp=0; | |
pmode = function(){ | |
init() | |
cells = $('.cell') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer