CTRL+A # move to beginning of line CTRL+B # moves backward one character CTRL+C # halts the current command CTRL+D # deletes one character backward or logs out of current session, similar to exit CTRL+E # moves to end of line
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
| require 'logger' | |
| module Log | |
| class << self | |
| def log | |
| @logger ||= Logger.new($stdout) | |
| @logger.formatter = proc do |severity, datetime, progname, msg| | |
| if(@interceptors) | |
| @interceptors.each { |interceptor| | |
| interceptor.call(severity, msg) |
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
| # Walk a dependency graph | |
| # | |
| def walk(deps, available = []) | |
| # End condition | |
| return if deps.keys.size == available.size | |
| if available.size == 0 | |
| deps.each do |f, h| | |
| next if h[:visited] == true | |
| next if h[:includes].size > 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
| #!/bin/bash | |
| cmd="sleep 5s" | |
| # Run a command | |
| nohup $cmd > /dev/null 2>&1 & | |
| pid=$! | |
| # Here is the process id | |
| echo $pid |
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
| test: | |
| ruby -p -i.old -e '$$_.gsub!('name', "$$USER" )' *.v |
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
| # 0. Shortcuts. | |
| CTRL+A # move to beginning of line | |
| CTRL+B # moves backward one character | |
| CTRL+C # halts the current command | |
| CTRL+D # deletes one character backward or logs out of current session, similar to exit | |
| CTRL+E # moves to end of line |
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
| [user] | |
| name = Victor Benarbia | |
| email = victor.benarbia@arm.com | |
| [push] | |
| default = simple | |
| [alias] | |
| ci = commit | |
| ll = log --graph --stat --abbrev-commit --decorate=full | |
| lp = log --graph --patch --abbrev-commit --decorate=full | |
| lm = log --graph --patch --abbrev-commit --decorate=full --author victor |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| ) |
Editor:
- Install nano
- Install language package: https://github.com/scopatz/nanorc
Git
- Install git
- Setup gitconfig: https://gist.github.com/jvmvik/7d6cc45d9776a682bb2b0bbbba7e1bd3