Skip to content

Instantly share code, notes, and snippets.

View ionatan-israel's full-sized avatar
🏠
Working from home

Jonatan Rodríguez ionatan-israel

🏠
Working from home
View GitHub Profile

This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.

This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)

Xcode

Make sure you have the latest version of XCode installed. Available from the Mac App Store.

Install the Xcode Command Line Tools:

xcode-select --install

@ionatan-israel
ionatan-israel / .zshrc
Last active August 29, 2015 14:05
Algunos alias útiles.
export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
alias open='thunar'
alias gb='git branch'
alias gc='git commit -m'
alias gf='git diff'
from __future__ import absolute_import
from tempfile import NamedTemporaryFile
from django.conf import settings
from django.http import HttpResponse
from django.template.response import TemplateResponse
from django.utils.encoding import smart_str
from django.views.generic import TemplateView
@ionatan-israel
ionatan-israel / print.css
Last active August 29, 2015 14:03
Hoja de Estilos base para imprimir (Size Letter)
@font-face {
font-family: 'Cambria';
src: url('fonts/Cambria.eot');
src: local('☺'),
url('fonts/Cambria.woff') format('woff'),
url('fonts/Cambria.ttf') format('truetype'),
url('fonts/Cambria.svg') format('svg');
font-weight: normal;
font-style: normal;
}
// JavaScript Document
// Función para recoger los datos de PHP según el navegador, se usa siempre.
function objetoAjax(){
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
@ionatan-israel
ionatan-israel / sentry.conf
Created May 30, 2014 20:56
Supervisor:: Configuración correr Sentry como un servicio.
[program:centinela]
command=/home/sentry/.virtualenvs/sentry/bin/sentry start http
environment=PATH="/home/sentry/.virtualenvs/sentry/bin"
directory=/home/sentry/
user=sentry
autostart=true
autorestart=true
redirect_stderr=true
@ionatan-israel
ionatan-israel / how_south.py
Last active August 29, 2015 14:01
Trabajando con South
"""
uso basico de south
"""
# GENERAR MIGRACIONES:
# si es una app nueva
./manage.py schemamigration aplication --initial
# si se realizan cambios, entonces
./manage.py schemamigration aplication --auto
#!/usr/bin/env bash
if [ $EUID != 0 ]; then
"This script must be run with sudo"
exit $?
fi
echo " Installing dependencies"
apt-get install ia32-libs -y # Note: This dep is a bit overkill but it's useful anyway
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
@ionatan-israel
ionatan-israel / gist:9438153
Created March 8, 2014 20:10
Script to reload apps of PythonAnywhere
#! /usr/bin/env python
import mechanize
import getpass
import time
import os
def reload(username=None, password=None):
if username is None:
username = raw_input('Username: ')