Skip to content

Instantly share code, notes, and snippets.

View oscargicast's full-sized avatar
🐍
To the infinity and beyond

Oscar oscargicast

🐍
To the infinity and beyond
View GitHub Profile

Keybase proof

I hereby claim:

  • I am oskargicast on github.
  • I am oskargicast (https://keybase.io/oskargicast) on keybase.
  • I have a public key ASBIZAcxwjTg2vlpIVqdROkZbw6vzGtdeuLM08Gvnr8wnQo

To claim this, I am signing this object:

// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
@oscargicast
oscargicast / .siegerc
Last active August 29, 2015 14:22 — forked from stansmet/.siegerc
# Updated by Siege 2.72, July-07-2012
# Copyright 2000-2007 by Jeffrey Fulmer, et al.
#
# Siege configuration file -- edit as necessary
# For more information about configuring and running
# this program, visit: http://www.joedog.org/
#
# Variable declarations. You can set variables here
# for use in the directives below. Example:
# zsh
EMOJI=(💩 🐦 🚀 🐞 🎨 🍕 🐭 👽 ☕️ 🔬 💀 🐷 🐼 🐶 🐸 🐧 🐳 🍔 🍣 🍻 🔮 💰 💎 💾 💜 🍪 🌞 🌍 🐌 🐓 🍄 )
function random_emoji {
echo -n "$EMOJI[$RANDOM%$#EMOJI+1]"
}
PROMPT="$(random_emoji) "
RPROMPT='%c'

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-online-status \
tmux-plugins/tmux-battery \
'
source "/usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf"
@oscargicast
oscargicast / back_vimrc.sh
Created November 17, 2014 18:09
back_vimrc
"Pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
filetype plugin on
set mouse=a
" Quicker window movement
map <C-J> <C-W>j
@oscargicast
oscargicast / .zsh_aliases.sh
Created November 17, 2014 17:55
.zsh_aliases
# play sound after command
alias s='aplay -q ~/.zsh/sounds/done.wav 2>/dev/null'
# virtualenv3
alias virtualenv3='virtualenv --python=python3'
# Django
alias pm='python manage.py'
alias pmr='python manage.py runserver'
alias pms='python manage.py shell'
@oscargicast
oscargicast / .zsh_profile.sh
Last active July 29, 2016 11:41
zsh_profile
# import aliases
if [ -f ~/.zsh_aliases ]; then
. ~/.zsh_aliases
fi
# set color
export TERM=xterm-256color
# print welcome message
python ~/.zsh/shascii/welcome.py
@oscargicast
oscargicast / .zshrc
Last active August 29, 2015 14:04
zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Uncomment the following line to use case-sensitive completion.