Signal | Value | Action | Comment |
---|---|---|---|
SIGHUP | 1 | Term | Hangup detected on controlling terminal or death of controlling process |
SIGINT | 2 | Term | Interrupt from keyboard |
SIGQUIT | 3 | Core | Quit from keyboard |
SIGILL | 4 | Core | Illegal Instruction |
SIGABRT | 6 | Core | Abort signal from abort(3) |
SIGFPE | 8 | Core | Floating point exception |
SIGKILL | 9 | Term | Kill signal |
SIGSEGV | 11 | Core | Invalid memory reference |
SIGPIPE | 13 | Term | Broken pipe: write to pipe with no readers |
This file contains hidden or 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
# add this in ur bashrc script | |
switch_ssh(){ | |
envs=() | |
for file in $(find ~/.ssh -name "id_rsa.pub.*" -printf "%f\n"); do | |
runtime=$( echo $file | awk -F '.' '{print $NF}' ) | |
envs+=( $runtime ) | |
done | |
i=0 |
This file contains hidden or 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 Hooks | |
@@before_methods = [] | |
@@after_methods = [] | |
def before(*method_names, **actions) | |
# create a Module for preprend to exisitng class | |
to_prepend = Module.new do | |
method_names.each do |method| | |
@@before_methods << method | |
define_method(method) do |*args, &block| | |
send(actions[:do]) if @@before_methods.include? method |