Skip to content

Instantly share code, notes, and snippets.

View artm's full-sized avatar

Artem Baguinski artm

  • Performation B.V.
  • Emmen, NL
  • 05:13 (UTC +02:00)
View GitHub Profile
@artm
artm / .gitignore
Last active December 12, 2015 10:48
test case for issue 50 of capybara-webkit
public
@artm
artm / application.css
Created December 31, 2012 11:26
sample application style sheet for WatchThatSound 3.1
* {
font-family: Verdana;
}
QToolButton {
font-weight: bold;
padding: 1px;
}
#video_half { background: black; }
@artm
artm / xmas.rb
Created December 20, 2012 10:25
a derivative work from climagick's "Let It Snow In Your Terminal" (http://climagic.org/coolstuff/let-it-snow.html), see also https://gist.github.com/4344001
require 'set'
rows,columns = `stty size`.scan(/\d+/).map{|x| x.to_i}
# ruby 1.8.x compatible way to say "\u2743"
Flake = ["2743".to_i(16)].pack("U*")
# Shapes from far away to still closer
Snow = ['.','*',Flake]
# flake state descriptor
@artm
artm / terminal-x-mass.awk
Created December 20, 2012 09:04
remake with uglified ruby oneliner (ruby 1.8.x and 1.9.x compatible)
# reverse engineering gawk code
{
rnd_column = $3; # comes from bash $(($RANDOM%$COLUMNS))
snow = $4; # comes from bash $(printf "\u2743\n")
snow_progress[ rnd_column ] = 0;
for(row in snow_progress) {
old_col = snow_progress[row];
snow_progress[row] = snow_progress[row] + 1;
# erase snowflake at previous position
printf "\033[%s;%sH ",old_col,row;
@artm
artm / ruby-backtrace.txt
Created November 9, 2012 11:18
Middleman server crash
Process: ruby [15955]
Path: /Users/artm/.rbenv/versions/1.9.3-p194/bin/ruby
Identifier: ruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [25775]
Date/Time: 2012-11-09 11:45:01.335 +0100
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
@artm
artm / fixup.rb
Created September 7, 2012 18:34
"fix up" osx application bundles
require "fileutils"
class BundleFixer
def initialize(bundle)
@bundle_dir = bundle.sub(%r{/$},"")
raise "No such bundle #{bundle}" unless File.directory? @bundle_dir
basename = File.basename(@bundle_dir, ".app")
@embed_dir = "#{@bundle_dir}/Contents/Frameworks"
@embed_rel_dir = "@executable_path/../Frameworks"
@artm
artm / psych-gc.rb
Created April 17, 2012 12:06
psych object_id confusion
require 'psych'
require 'yaml'
class General
def gen
# this amount was found expetimentally and exposes the problem eventually on my machine
(1...2000).map do |x|
Float(x)
end
end
@artm
artm / bg.rb
Created March 20, 2012 15:28
fail in bg the second time around
Given /^I puts "([^"]*)"$/ do |arg1|
if !$ran
puts arg1
$ran = arg1 == 'fg1'
else
true.should == false
end
end
set viminfo=!,'100,<50,s10,h
au VimLeavePre * let g:BG = &background
au VimEnter * if exists("g:BG") | let &background = g:BG | endif
@artm
artm / shorter
Created March 15, 2012 15:34 — forked from pita5/gist:2044780
template.gsub!('{{CONNECT_MEETING_099}}', delegate[12] || '')