Skip to content

Instantly share code, notes, and snippets.

View mindreframer's full-sized avatar
🎯
Focusing

Roman Heinrich mindreframer

🎯
Focusing
View GitHub Profile
@mindreframer
mindreframer / list.md
Last active August 29, 2015 13:55
My Fav Software on fresh Mac OSX
@mindreframer
mindreframer / install.md
Created February 4, 2014 14:24
Install Lunchy
@mindreframer
mindreframer / links.md
Last active August 29, 2015 13:56
Manage your Dev Machine by Chef/Puppet
@mindreframer
mindreframer / mini_bundler.rb
Last active August 29, 2015 13:56
mini_bundler
#!/usr/bin/env ruby
#### Usage:
## ./mini_bundler -> will install gems
## ./mini_bundler cache -> will cache installed gem-file in vendor/cache
def execute(cmd)
log "CMD: #{cmd}"
%x(#{cmd})
@mindreframer
mindreframer / gist:9052527
Last active August 29, 2015 13:56
fixing not required libraries for chef
## to fix lib dependency, put this on top of your recipe file.
self.run_context.cookbook_collection[self.cookbook_name].library_filenames.each { |e| load(e) }
## in a cookbook, that needs my_cookbook
## in metadata.rb
depends 'my_cookbook'
http://ulozto.net/xnvgH92b/skype-6-6-0-106-by-salwoh-exe
@mindreframer
mindreframer / slack.rake
Last active August 29, 2015 14:06
slack + capistrano
# lib/capistrano/tasks/slack.rake
# install slack-notifier gem
# include this file into your lib/capistrano/tasks/ folder
# add this line to the end of your Capfile:
# Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
# deploy with:
# MSG='fixing that payment bug...' cap staging deploy
class SlackNotifierWrapper
@mindreframer
mindreframer / give_index.rb
Created November 30, 2014 21:42
give files index based on order in a table of content file
# quick script to give files an index calculated from a table of contents file
class Renamer
COMMON_STRING = 'Series Name by Author Name'
def run
actual.content.each do |file|
clean_file = file.gsub(COMMON_STRING, '')
to = wished.wished_file_for_file(clean_file)
cmd = "mv '#{file}' #{to}"
puts cmd
`#{cmd}`
@mindreframer
mindreframer / benchmark.rb
Last active August 29, 2015 14:19
proc vs. direct method call
require 'benchmark'
require 'json'
HASH = {'a'=>1, 'b'=>[1,2,3]}
class Roda
class << self
attr_accessor :opts
end
end