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
SECURE_CONFIG_FILE=.env | |
SECURE_ENV_VARIABLES=${shell cat $(SECURE_CONFIG_FILE)} | |
BUILD_DIR=_build | |
TEST_BUILD_DIR=_build_test | |
COMPILE_INCLUDE_DIR_FLAGS=-I source/std -I source/actions -I source/storages -I source/services -I source/types | |
COMPILE_INCLUDE_TEST_DIR_FLAGS=-I test/examples -I test/types -I test/storages -I test/actions -I test/services -I test/std | |
dist/handler.js: node_modules source/*.ml $(wildcard source/*.mli) source/std/*.ml source/std/*.mli source/actions/*.ml source/actions/*.mli | |
ocamlbuild -no-links -use-ocamlfind -X $(TEST_BUILD_DIR) $(COMPILE_INCLUDE_DIR_FLAGS) -no-sanitize -no-hygiene source/main.byte | |
js_of_ocaml $(BUILD_DIR)/source/main.byte |
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
FROM rosenhouse/phantomjs2 | |
MAINTAINER Vladimir Terekhov <zarkzork@gmail.com> | |
RUN apt-get update && apt-get install -y build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config libpq-dev make wget unzip git mysql-client libmysqlclient-dev imagemagick sendmail | |
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv && \ | |
mkdir /usr/local/rbenv/plugins && \ | |
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
ENV RBENV_ROOT /usr/local/rbenv |
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
### Keybase proof | |
I hereby claim: | |
* I am zarkzork on github. | |
* I am zarkzork (https://keybase.io/zarkzork) on keybase. | |
* I have a public key whose fingerprint is 5E00 F5A2 F97F 8682 856C 8800 9D18 BF0C 7B3B FBE2 | |
To claim this, I am signing this object: |
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
(* schema *) | |
module type Schema = sig | |
type t | |
end | |
module Schema = struct | |
type t | |
type value_type = |
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 'strscan' | |
# single pass converter semi-automatic converter from erb to dust | |
input_stream = $stdin.read | |
# Class to parse ruby line and detect its type, filling symbol table | |
# with references. | |
class RubyLine | |
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
class String | |
def triads() | |
string = self.clone | |
Enumerator.new do |y| | |
while string.size > 2 | |
y << string.slice(0, 3) | |
string.slice!(0) | |
end | |
end | |
end |
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
import Data.List | |
import Data.Map | |
import System.Environment | |
import Control.Monad | |
import System.IO | |
-- returns triagrams for given string | |
splitIntoTrigrams :: String -> [String] | |
splitIntoTrigrams (a : b : c : ls) = (a : b : c : []) : splitIntoTrigrams (b : c : ls) | |
splitIntoTrigrams (b : c : []) = [] |
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
(defun next-same-indentation () | |
(interactive) | |
(let ((target-indentation (current-indentation))) | |
(while (progn | |
(next-line) | |
(/= target-indentation (current-indentation)))))) | |
(defun previous-same-indentation () | |
(interactive) |
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
class Server | |
def parse_command | |
line = $stdin.readline.chomp | |
command, arguments = line.split(' ', 2) | |
if commands.include?(command) | |
self.send(command, arguments) | |
else |
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
(start-process "ls" nil "ls") | |
(defun keep-output (process output) | |
(setq kept (cons output kept))) | |
(setq kept nil) | |
(set-process-filter (get-process "ls") 'keep-output) | |
NewerOlder