Sources: rbenv, ruby-build
Install Xcode Command Line Tools
xcode-select --install| func writeCors(w http.ResponseWriter, origin string) { | |
| allowedOrigins := []string{ | |
| `http://localhost:1234`, | |
| `https://mydomain(\-\w+)?\.now\.sh`, | |
| } | |
| for _, s := range allowedOrigins { | |
| if match, _ := regexp.MatchString(s, origin); match { | |
| w.Header().Set("Access-Control-Allow-Origin", origin) | |
| w.Header().Set("Access-Control-Allow-Methods", "GET") |
| ### Taken from: https://dalibornasevic.com/posts/68-processing-large-csv-files-with-ruby | |
| def print_memory_usage | |
| memory_before = `ps -o rss= -p #{Process.pid}`.to_i | |
| yield | |
| memory_after = `ps -o rss= -p #{Process.pid}`.to_i | |
| bytes_used = memory_after - memory_before | |
| mb_used = (bytes_used / 1000.0).round(2) | |
| puts "Memory: #{mb_used} MB" |
| #!/usr/bin/env fish | |
| source ~/.asdf/asdf.fish | |
| set normal (set_color normal) | |
| set magenta (set_color magenta) | |
| set yellow (set_color yellow) | |
| set green (set_color green) | |
| set red (set_color red) | |
| set gray (set_color -o black) |
| { | |
| "semi": false, | |
| "singleQuote": true, | |
| "trailingComma": "all" | |
| } |
| # use coreutils ls | |
| # brew install coreutils | |
| alias ls="gls -lh --color=auto --group-directories-first" | |
| alias ll="ls -la" | |
| alias la="ls -Ad .*" | |
| alias l="ls -C" | |
| # colorful bash prompt | |
| export PS1="\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " |
Sources: rbenv, ruby-build
Install Xcode Command Line Tools
xcode-select --install| from getopt import getopt, GetoptError | |
| import sys | |
| def main(): | |
| try: | |
| opts, args = getopt(sys.argv[1:], 'h', 'help') | |
| except GetoptError as err: | |
| print(err) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>allienx</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| </head> | |
| <body> | |
| <div class="animation-container"> | |
| <div class="letter">a</div> | |
| <div class="letter">l</div> |
# setup desktop files
sudo cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applications
sudo cp /usr/share/applications/unity-control-center.desktop ~/.local/share/applications
sudo chown alin:alin ~/.local/share/applications/*
# update with values provided in .desktop gist files
# update .bashrc with better ls aliases