Skip to content

Instantly share code, notes, and snippets.

View eduramirezh's full-sized avatar

Eduardo Ramírez eduramirezh

View GitHub Profile
@Bouke
Bouke / gist:10454272
Last active September 22, 2023 17:23
Install FreeTDS, unixODBC and pyodbc on OS X

First, install the following libraries:

$ brew install unixodbc
$ brew install freetds --with-unixodbc

FreeTDS should already work now, without configuration:

$ tsql -S [IP or hostname] -U [username] -P [password]
locale is "en_US.UTF-8"

locale charset is "UTF-8"

@francorest
francorest / setupForRails.sh
Last active August 29, 2015 13:58
Setting Ubuntu 12.04 Production Environment from scratch for Ruby On Rails
# Ubuntu 12.04
# Goal: Setting up Production Environment for Ruby On Rails
# First Step: Create new user
# sudo useradd nameOfNewUser
# sudo passwd PASSWORD
# sudo adduser nameOfNewUser sudo
# su nameOfNewUser
# chsh (/bin/bash)
# sudo chown nameOfNewUser /home/nameOfNewUser
@cobyism
cobyism / gh-pages-deploy.md
Last active June 20, 2024 17:38
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@rbonvall
rbonvall / rut.py
Created July 5, 2010 23:56
Dígito verificador del RUT en Python
# encoding=utf-8
# Obtener el dígito verificador del RUT en Python.
#
# La función recibe el RUT como un entero,
# y entrega el dígito verificador como un entero.
# Si el resultado es 10, el RUT es "raya k".
from itertools import cycle