Skip to content

Instantly share code, notes, and snippets.

View xheisenbugx's full-sized avatar
🏠
Working from home

Osvaldo xheisenbugx

🏠
Working from home
  • ~/.config/nvim
  • 22:54 (UTC -06:00)
View GitHub Profile

Lista de plugins recomendados para zsh

  • colorize
  • virtualenv
  • command-not-found
@xheisenbugx
xheisenbugx / .profile
Created February 20, 2018 18:15
My personal .profile file
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@xheisenbugx
xheisenbugx / snake.py
Created February 19, 2018 19:55 — forked from paul-schwendenman/snake.py
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)
@xheisenbugx
xheisenbugx / gunicorn
Created February 19, 2018 19:42 — forked from paul-schwendenman/gunicorn
Gunicorn setup
#!/bin/bash
# /etc/init.d/gunicorn
### BEGIN INIT INFO
# Provides: gunicorn
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
@xheisenbugx
xheisenbugx / nginx-site.sh
Created February 18, 2018 05:52 — forked from ljfauscett/nginx-site.sh
nginx enable/disable sites
#!/bin/bash
SITES_AVAILABLE_DIR=/etc/nginx/sites-available
SITES_ENABLED_DIR=/etc/nginx/sites-enabled
function print_usage() {
echo "nginx-site -e <site name> to enable"
echo "nginx-site -d <site name> to disable"
}
@xheisenbugx
xheisenbugx / git_rewrite.txt
Created February 6, 2018 22:01
Rewrite the name and email in all the commits
git filter-branch --env-filter '
WRONG_EMAIL="oaaburto@example.com"
NEW_NAME="Osvaldo Cordova"
NEW_EMAIL="oca159@hotmail.es"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
@xheisenbugx
xheisenbugx / nginxproxy.md
Created January 8, 2018 15:03 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@xheisenbugx
xheisenbugx / .gitignore
Created September 12, 2017 15:59
Gitignore (python)
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
{
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
"enable_tab_scrolling": false,
@xheisenbugx
xheisenbugx / .gitignore
Created June 16, 2017 16:35
Gitignore for python development on Mac and using Pycharm
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python