Skip to content

Instantly share code, notes, and snippets.

@tsamaya
tsamaya / bash_profile
Last active March 1, 2020 20:44
bash profile
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
export JAVA_HOME=$(/usr/libexec/java_home)
#export PATH="/usr/local/sbin:$PATH"
@tsamaya
tsamaya / my-global-npm.md
Last active November 18, 2017 17:31
My npm packages globally installed
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tsamaya
tsamaya / server.conf
Last active April 4, 2017 07:48
NGINX default server (letsencrypt)
# Default server configuration
#
server {
listen 80;
listen [::]:80;
server_name domain.net www.domain.net;
access_log /var/log/nginx/domain-http.log;
error_log /var/log/nginx/domain-error-http.log;
#!/bin/sh
res=0
IFS="
"
for f in `find . ! -type d`;
do
let " res += `wc -l $f | awk '{print $1}'` "
done
echo $res
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.