This file contains hidden or 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
apt-get install sudo curl vim wget | |
apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev | |
gleb@debian:~$ \curl -L https://get.rvm.io | bash -s stable --without-gems="rubygems-bundler" | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 184 100 184 0 0 206 0 --:--:-- --:--:-- --:--:-- 296 | |
100 19527 100 19527 0 0 14395 0 0:00:01 0:00:01 --:--:-- 14395 | |
Installing RVM without gems: rubygems-bundler. | |
Downloading RVM branch stable | |
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz to rvm-stable.tgz. |
This file contains hidden or 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
$('.timep input').off('blur').blur(function() { | |
var $t = $(this), v = $t.val(); | |
v = v.replace(':', ''); | |
v = v.replace('-', ''); | |
if (v > 2400) { | |
v = '0000'; | |
} | |
if (v.match(/\d{4}/)) { | |
$t.val(v.substr(0, 2) + ':' + v.substr(2, 2)); | |
} else if (v.match(/\d{2}/)) { |
This file contains hidden or 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
#! jQuery Ajax Queue - v0.1.2pre - 2013-03-19 | |
#* https://github.com/gnarf37/jquery-ajaxQueue | |
#* Copyright (c) 2013 Corey Frang; Licensed MIT | |
(($) -> | |
# jQuery on an empty object, we are going to use this as our Queue | |
ajaxQueue = $({}) | |
$.ajaxQueue = (ajaxOpts) -> | |
# run the actual query |
This file contains hidden or 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
#!/usr/bin/ruby | |
Dir.chdir(ARGV[0]) | |
cmd = "ack --css '#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})\\b' #{ARGV[0]}" | |
$stderr.puts cmd | |
resp = `#{cmd}` | |
resp.gsub! /#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})\b/, '<span style="background-color: #\1\2;">#\1\2</span>' | |
puts '<html><pre>' + resp + '</pre></html>' |
This file contains hidden or 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
# Sane scrolling | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
set -g mode-mouse on | |
set -g mouse-resize-pane on | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
# Toggle mouse on with ^B m | |
bind m \ |
This file contains hidden or 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
#!/bin/sh | |
# | |
# init.d script for single unicorn installation. | |
# | |
# This configures a unicorn master for your app at RAILS_ROOT running in | |
# production mode. It will read config/unicorn.rb for further set up. | |
# | |
# You should ensure different ports or sockets are set in each config/unicorn.rb if | |
# you are running more than one master concurrently. | |
# |
This file contains hidden or 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
#!/usr/bin/bash | |
git add --all . | |
git commit -a | |
git push |
This file contains hidden or 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
> bundle show ox | |
/home/gleb/.rvm/gems/ruby-2.0.0-p195@ml/gems/ox-2.0.2 | |
> uname -a | |
Linux ws.gleb.tv 3.9.5-1-ARCH #1 SMP PREEMPT Sat Jun 8 09:22:45 CEST 2013 x86_64 GNU/Linux | |
> gcc -v | |
Using built-in specs. | |
COLLECT_GCC=gcc | |
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper | |
Target: x86_64-unknown-linux-gnu | |
Configured with: /build/gcc/src/gcc-4.8.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-install-libiberty --disable-multilib --disable-l |
This file contains hidden or 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
test.rb:15: [BUG] Segmentation fault | |
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0005 p:---- s:0018 e:000017 CFUNC :sax_parse | |
c:0004 p:0030 s:0013 e:000012 BLOCK test.rb:15 [FINISH] | |
c:0003 p:---- s:0009 e:000008 CFUNC :open | |
c:0002 p:0113 s:0005 E:0017f0 EVAL test.rb:13 [FINISH] | |
c:0001 p:0000 s:0002 E:0020d8 TOP [FINISH] |
This file contains hidden or 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 'rubygems' | |
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__) | |
require 'bundler/setup' | |
require 'zlib' | |
require 'ox' | |
class Parser < ::Ox::Sax | |
end |