stderr in red
2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
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
adns | |
gettext | |
lame | |
matlab2tikz | |
sane-backends | |
adwaita-icon-theme | |
gflags | |
leptonica | |
maven | |
scapy |
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
Problem: I love AskHN, but they show top 60 posts so chances on losing good questions are high; | |
Solution: Found hnrss.org, use IFTTT to push updated to telegram. solved |
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
This is too good http://www.brynosaurus.com/pub/net/p2pnat/[C[C |
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
require 'json' | |
token = YOUR_TOKEN | |
cmd = "curl -H 'Authorization: Bearer #{token}' -H 'Accept-Language: en_US' -H 'Content-Type: application/json' 'https://api.uber.com/v1.2/history?limit=50'" | |
res = `#{cmd}` | |
b = JSON.parse(res) | |
require 'csv' | |
data = [["Request time", "Start time", "End time", "Distance", "Wait time", "Travel time", "Total time"]] | |
b["history"].each do |item| | |
rt = Time.at(item["request_time"]) | |
rts = rt.strftime("%m/%d/%Y %I:%M%p") |
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
def self.find_byjs(hash) | |
User.where("(json_store ->> '#{hash.keys.first}') = ?", hash.values.first).last | |
end | |
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
require 'json' | |
require 'csv' | |
def run_command(command) | |
puts "Running command #{command}" | |
res = `#{command}` | |
return res | |
end | |
args = {} | |
ARGV.each do |arg| |
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
# GistID:963f95aaf61d50e512511ac4eb097e50 | |
function add_alias() { | |
if [[ -z $1 || -z $2 || $# -gt 2 ]]; then | |
echo usage: | |
echo "\t\$$0 ll 'ls -l'" | |
else | |
echo "alias $1='$2'" >> $ALIASFILE | |
echo "alias ADDED to $ALIASFILE" | |
alias $1="$2" | |
fi |
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
CS | |
DMKS | |
Heterogeneous programming | |
OpenCl | |
https://en.wikipedia.org/wiki/OpenCL | |
Compilers | |
Design patterns | |
https://en.wikipedia.org/wiki/Worse_is_better | |
File System | |
File Descriptors |
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
" GistID: 963f95aaf61d50e512511ac4eb097e50 | |
"Constantly improve at vim | |
" http://vimgolf.com | |
" http://derekwyatt.org/vim/tutorials/advanced/ | |
" https://statico.github.io/vim3.html | |
" https://www.reddit.com/r/vim/comments/8gmmk3/how_to_continue_to_improve_at_vim/ | |
" https://stackoverflow.com/q/726894/2577465 | |
"Why | |
" http://www.viemu.com/a-why-vi-vim.html | |
"Headstart |
OlderNewer