View global-object.js
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 Validator {} | |
var global = window || global; | |
global.Validator = Validator; |
View .gitconfig
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
[user] | |
name = <yourname> | |
email = <youre email> | |
[alias] | |
co = checkout | |
unpushed = diff origin/master..HEAD --name-status | |
rpo = remote prune origin | |
notmerged = branch --no-merged | |
merged = branch --merged | |
[color] |
View mv_many_files
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
for f in huk/*.*; do mv "$f" ./; done |
View pry-cheatsheet
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
Pry Cheat Sheet | |
Youtube Tutorial 2013 | |
Command Line | |
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru) | |
pry -r ./config/environment.rb - load your rails into a pry session | |
Debugger | |
help ls -- Display command options for pry command ls | |
ls <Object> -- Show all of the available methods that can be called by an object |
View pry-cheatsheet
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
Pry Cheat Sheet | |
Youtube Tutorial 2013 | |
Command Line | |
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru) | |
pry -r ./config/environment.rb - load your rails into a pry session | |
Debugger | |
help ls -- Display command options for pry command ls | |
ls <Object> -- Show all of the available methods that can be called by an object |
View port_processes.txt
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
lsof -nP -iTCP:3000 | grep LISTEN |
View docker_commands.txt
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
docker ps | |
# running docker container | |
docker stop <contaienrId> | |
# stop the container | |
docker images | |
# list all installed images | |
# Start containers ========================================== | |
# REDIS | |
docker run -it --rm -p 6379:6379 -d --name redis redis:alpine |
View docker_commands.txt
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
docker ps | |
# running docker container | |
docker stop <contaienrId> | |
# stop the container | |
docker images | |
# list all installed images | |
# Start containers ========================================== | |
# REDIS | |
docker run -it --rm -p 6379:6379 -d --name redis redis:alpine |
View property_struct.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 PropertyStruct | |
def initialize(nil_safe = true) | |
@nil_safe = !!nil_safe | |
@data = {} | |
end | |
def [](attribute) | |
result = @data |
View sample_code.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
# ************************************************************************************************ | |
# *** Mergin with ghostscript | |
# ************************************************************************************************ | |
GhostScript = `which gs`.chomp | |
dir = Rails.root.join('tmp').to_s | |
file_names = [ | |
'2013_01_24_Pfandhalterschaft_DE.pdf', | |
'2013_01_24_Passivitaetserklaerung_DE.pdf', |
NewerOlder