Skip to content

Instantly share code, notes, and snippets.

View roolo's full-sized avatar

Mailo Světel roolo

View GitHub Profile
@roolo
roolo / README.md
Created January 27, 2012 19:44
Rails 3.2 new app seg fault

Description

It seems Rails 3.2 running on Ruby 1.9.3 crash when creating a new app. Specifically bundler crash.

Solution

The only solution which i have so far is to use Ruby 1.9.2 for Rails 3.2 app instead of using Ruby 1.9.3

Environment

#
# Removes numbers with underscore (321321_) from artist of songs selected in iTunes
#
tell application "iTunes"
tell front browser window
set selected_items to selection
repeat with one_item in my selected_items
set artist of one_item to (do shell script "echo '" & (artist of one_item) & "' | sed 's/^[0-9]*_//g' ")
end repeat
@roolo
roolo / face.svg
Created February 2, 2012 18:38
Svg example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def flatten_nested_groups
self.document.css('g g:only-child').each do |nested_group|
nested_group.attributes.each do |attr, attr_obj|
nested_group.parent.attributes[attr] = attr_obj
end
nested_group.remove
end
end
@roolo
roolo / svg_cleaner
Created February 3, 2012 15:00
constructor
def initialize svg
@document = svg
end
@roolo
roolo / README.md
Created February 25, 2012 00:45
Auto Labeling by Folder Actions

Save add - yellowize.scpt into ~/Library/Scripts/Folder Action Scripts. Then ⌃+click on some folder and select Folder Actions Setup. Attach the scpt file and try to copy something into tested folder

describe "Parser" do
it "parse" do
parsed_team_name = MyParser.parse('url')['jop']
xml = Nokogiri::XML VCR.get 'xmlid345'
xml.at_xpath('//team/stats/foul/@commited').value.should == parsed_team_name
end
end
@roolo
roolo / default.ini
Created March 12, 2012 16:50
Hash merging
[base]
data_working_dir = "/tmp"
@roolo
roolo / term - ls
Created March 16, 2012 13:59
Nastroje na mac
╭─mailo@minimir ~ ‹ruby-1.9.2›
╰─$ ls /bin
[ cat cp date df echo expr kill launchctl ln mkdir pax pwd rm sh stty tcsh unlink zsh
bash chmod csh dd domainname ed hostname ksh link ls mv ps rcp rmdir sleep sync test wait4path
╭─mailo@minimir ~ ‹ruby-1.9.2›
╰─$ ls /sbin
SystemStarter dynamic_pager fsck_cs fsck_udf fstyp_ntfs ip6fw launchd mount_acfs mount_devfs mount_hfs mount_smbfs newfs_exfat nfsd ping route
autodiskmount emond fsck_exfat fstyp fstyp_udf ipfw md5 mount_afp mount_exfat mount_msdos mount_udf newfs_hfs nfsiod ping6 rtsol
disklabel fibreconfig fsck_hfs fstyp_hfs halt kextload mknod mount_cd9660 mount_fdesc mou
@roolo
roolo / config.log
Created March 21, 2012 11:06
brew install openssl
HOMEBREW_VERSION: 0.8.1
HEAD: 0dcd0713175a0382b646f9c45665d6b1b4c4000c
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.1
GCC-4.0: N/A
GCC-4.2: build 5666