Skip to content

Instantly share code, notes, and snippets.

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

Osvaldo Cordova Aburto oca159

🏠
Working from home
View GitHub Profile
@oca159
oca159 / .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
@oca159
oca159 / Preferences.sublime-settings
Created June 16, 2017 17:50
Sublime preferences
{
"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,
@oca159
oca159 / .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
@oca159
oca159 / virtualenvwrapper.md
Created June 15, 2017 19:38
Virtualenvwrapper configuration

Add the following line to ~/.virtualenvs/venv/postactivate and ~/.virtualenvs/venv/postdeactivate

source ~/.oh-my-zsh/themes/honukai.zsh-theme

Visual Studio Code

Plugins

  • Python
  • Unique Lines
  • Djaneiro -Django Snippets
  • Django Template
  • Sublime Text Keymap
# Machine name.
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
}
# Directory info.
local current_dir='${PWD/#$HOME/~}'
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
@oca159
oca159 / .zshrc
Last active December 14, 2022 22:45
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
if [ -f "$HOME/.oh-my-zsh/themes/honukai.zsh-theme" ]; then
@oca159
oca159 / switch.py
Created June 14, 2015 18:23
Simular switch en python
def f(x):
return {
'a': 1,
'b': 2,
}.get(x, "No se encontró esa opción")
/*
* C++ - Arbol binario de busqueda aplicado en archivos
* Copyright 2013 Martin Cruz Otiniano
* Description : Tiene las funciones de insertar registro en un nodo (escribir), mostrar los registros
* haciendo uso del algoritmo y eliminar archivo ABB.
* Site : www.marcsdev.com
*/
#include <iostream>
#include <stdio.h>
/*
* C++ - Metodo de dispersion (Hashing)
* Copyright 2013 Martin Cruz Otiniano
* Site: www.marcsdev.com
*/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>