View beamdec
This file contains 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/env escript | |
main([BeamFile]) -> | |
{ok, {_, [{abstract_code, {_, AC}}]}} = beam_lib:chunks(BeamFile, [abstract_code]), | |
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]). |
View yosemite_conf.sh
This file contains 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
#Enable repeat on keydown | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
#Use current directory as default search scope in Finder | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
#Show Path bar in Finder | |
defaults write com.apple.finder ShowPathbar -bool true | |
#Show Status bar in Finder |
View expr.erl
This file contains 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
-module(expr). | |
-export([ | |
parse/1, | |
test/0 | |
]). | |
% ------------------------------------------------------ | |
% | |
% Simple math-expressions parser |
View fish_prompt
This file contains 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
# ~/.config/fish/functions/fish_prompt.fish | |
# name: Robbyrussell edited | |
# author: Bruno Ferreira Pinto, edit by Yuri Artemev | |
function fish_prompt | |
if not set -q -g __fish_robbyrussell_art_functions_defined | |
set -g __fish_robbyrussell_art_functions_defined | |
function _git_branch_name | |
echo (git rev-parse --abbrev-ref HEAD ^/dev/null) |
View gemfile_parser.rb
This file contains 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
class GemfileParser | |
attr_reader :gemfile | |
EXCLUDED = ["rails"] | |
def self.gems_status gemfile | |
new(gemfile).gems_status | |
end | |
def initialize gemfile |
View gist:6163880
This file contains 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
class BaseWall | |
def self.Wall length, width, material | |
Module.new do | |
define_method(:length) { length } | |
define_method(:width) { width } | |
define_method(:material) { material } | |
def self.included clazz | |
private :length, :width, :material | |
end |
View tip.rb
This file contains 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
# string merging | |
"asd" "qwe" "zxc" | |
# => "asdqwezxc" | |
# separators may be a space | |
% sometext .size | |
# => 8 |
NewerOlder