Skip to content

Instantly share code, notes, and snippets.

View defHLT's full-sized avatar
🐔

Artem Kholodnyi defHLT

🐔
View GitHub Profile
#!/usr/bin/ruby
# encoding: utf-8
# Created: 2013-03-30 11:49:19 +0200
# How often to check in seconds:
TIMEOUT = 10
# Alert when lag is greates then in seconds:
LAG_MAX = 0.05
STDOUT.sync = true
# Get the compile-dependencies of vim
sudo apt-get build-dep vim
# If you haven't got mercurial, checkinstall
sudo apt-get install mercurial checkinstall
# Get the source
hg clone https://vim.googlecode.com/hg/ vim
# Compile it
cd vim
./configure \
--enable-luainterp=dynamic \
# See "Lisp Macros in 20 Minutes"
# at http://www.slideshare.net/pcalcado/lisp-macros-in-20-minutes-featuring-clojure-presentation
# Ruby implementation var. 1 {
def from(names)
keys, vals = [], []
i = -1
names.each do |name|
r = yield name
require 'benchmark'
require 'set'
arr = []
set = Set.new
1000.times do |_|
r = rand(1000)
arr << r
set << r