Skip to content

Instantly share code, notes, and snippets.

View luismayta's full-sized avatar
😎
life is fun, so is coding

Lucho Mayta luismayta

😎
life is fun, so is coding
View GitHub Profile
@luismayta
luismayta / zsh.md
Last active August 29, 2015 14:09 — forked from tsabat/zsh.md
@luismayta
luismayta / supervisord-example.conf
Last active August 29, 2015 14:28 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@luismayta
luismayta / solutionAudio.txt
Created March 10, 2012 14:16
solucion a problema de audio en ubuntu
sudo apt-get update
sudo apt-get upgrade
sudo apt-get purge linux-sound-base alsa-base alsa-utils
sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop
@luismayta
luismayta / pre-commit.sh
Created April 3, 2012 21:30
PHP CodeSniffer pre-commit hook for git
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <soenke@ruempler.eu>
# @author Sebastian Kaspari <s.kaspari@googlemail.com>
#
# see the README
PHPCS_BIN=/usr/bin/phpcs
PHPCS_CODING_STANDARD=PEAR
@luismayta
luismayta / gist:2399497
Created April 16, 2012 15:33 — forked from ppanyukov/gist:1035407
Using p4merge with Git Mac OS X or Ubuntu

Git config

$ git config --global -e
[merge]
    keepBackup = false;
    tool = p4merge
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"

keepTemporaries = false

@luismayta
luismayta / prompt-branch.sh
Created April 24, 2012 17:11
nombre del branch en el prompt
#Code for bash, goes into ~/.bashrc:
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
@luismayta
luismayta / p4merge
Created April 25, 2012 16:29
configurar p4merge para git
p4merge*
Create a new text file in /usr/local/bin called p4merge and add the following lines:
#!/bin/sh
/home/usuario/Contents/MacOS/p4merge $*
Make the script executable by entering this command:
chmod +x p4merge
@luismayta
luismayta / config-p4merge.sh
Created April 25, 2012 16:31
git config for p4merge
#git config --global -e
[merge]
keepBackup = false;
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
@luismayta
luismayta / README.md
Created June 7, 2012 22:17 — forked from rduplain/README.md
Connect to MSSQL using FreeTDS / ODBC in Python.

Goal: Connect to MSSQL using FreeTDS / ODBC in Python.

Host: Ubuntu 11.10 x86_64

Install:

sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy

In /etc/odbcinst.ini: