View install_all_nerdfonts_via_homebrew.sh
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
#!/bin/sh | |
# Nerd Fonts for your IDE | |
# https://www.nerdfonts.com/font-downloads | |
brew tap homebrew/cask-fonts | |
brew install --cask font-3270-nerd-font font-fira-mono-nerd-font font-inconsolata-go-nerd-font font-inconsolata-lgc-nerd-font \ | |
font-inconsolata-nerd-font font-monofur-nerd-font font-overpass-nerd-font font-ubuntu-mono-nerd-font font-agave-nerd-font \ |
View pretzo_theme_previews.sh
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
for i in $(prompt -l | sed '1d' | sed 's/ /\n/g') | |
do | |
echo $i: | |
echo $(prompt -p $i) "\n\n" | |
done |
View tensorflow_gpu_macos.txt
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
# Xcode 8, cudnn 6.1, cuda 8.0, | |
# bazel 0.5.4, tensorflow r1.3 | |
# takes about 36 min on macbook pro 2.8Ghz, 8GB RAM | |
# edit *tensorflow/third_party/gpus/cuda/BUILD.tpl* | |
# [#comment out] linkopts = [“-lgomp”] | |
$ export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/extras/CUPTI/lib | |
$ export LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH\nexport PATH=$DYLD_LIBRARY_PATH:$PATH \ | |
export flags="--config=cuda --config=opt" | |
$ export CUDA_HOME=/usr/local/cuda |
View connstat
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
netstat -nat | grep `nslookup {DOMAIN} | awk '/Address/ ' | sed 's/^.*Address: //p' | tail -1` | awk '{print $6}' | sort | uniq -c | sort -n |
View economet
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
#!/bin/python3 | |
""" | |
returns possible combinatations in a list | |
""" | |
def combo(n,k): | |
import itertools | |
return list(itertools.combinations(list(range((n-(n-1)),(n+1))),k)) |
View rPackages.r
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
# $ brew install unixodbc on mac | |
install.packages("devtools") | |
devtools::install_github("selva86/InformationValue") | |
install.packages(c("RODBC","RPostgreSQL","RSQLite","RMySQL", | |
"xlsx","XLConnect","foreign", | |
"dplyr","tidyr","stringr","lubridate","reshape", | |
"ggplot2","ggvis","rgl","htmlwidgets","googleVis","RColorBrewer", |
View .profile
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
PS1="\n\u@\h: \[\e[1;36m\]\w\n\[\e[1;32m\]=> \[\e[0m\]" | |
alias ls='ls -G' | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
export WORKON_HOME=$HOME/.virtualenvs | |
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' | |
export PIP_VIRTUALENV_BASE=$WORKON_HOME | |
export PIP_RESPECT_VIRTUALENV=true | |
export DOCKER_HOST=tcp://192.168.59.103:2376 |
View hdfs-yarn-spark
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
{ | |
"configurations": [ | |
{ | |
"nagios-env": { | |
"nagios_contact": "alvaromuir@gmail.com" | |
} | |
} | |
], | |
"host_groups": [ | |
{ |
View prep_dfa_import.sh
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
#!/bin/bash | |
# Script to prep a downloaded dfa file for transfer and ETL to warehouse | |
# or Hadoop cluster | |
# takes a sample via subsample for python | |
# https://pypi.python.org/pypi/subsample/0.0.6 | |
# and gzips for export | |
# | |
# ex: | |
# $ ./prep_dfa_import.sh <1234_downladed_dfa.csv> <new_file.csv> <sample.csv> | |
# @alvaromuir, 04.19.2015 |
View ssh-auth
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
#!/bin/bash | |
# Script to create passwordless ssh on remote machine from current host | |
# requires ssh, naturally | |
# example usage: ssh-auth foreign.host.com id_dsa.pub myUserName | |
# @alvaromuir, 6.19.15 | |
set -e | |
USAGECMD="Usage: $0 <hostname> <public-key.pub> [opt: username]" | |
SSHHOME=~/.ssh/ | |
if [ "$3" ] |
NewerOlder