Skip to content

Instantly share code, notes, and snippets.

View agarie's full-sized avatar

Carlos Agarie agarie

View GitHub Profile
@mislav
mislav / json2csv.rb
Created October 5, 2009 13:47
Dump Twitter followers to JSON or CSV
# Usage:
# ruby -rubygems json2csv.rb my-dump.json > people.csv
#
require 'json'; require 'csv'
FIELDS = %w(id screen_name name friends_count followers_count)
data = JSON.load ARGF
csv = CSV::Writer.create(STDOUT)
data.each { |user| csv << FIELDS.map { |f| user[f] } }
@uhlenbrock
uhlenbrock / deploy.rb
Created January 25, 2010 21:47
Simple Capistrano recipe for Jekyll
set :application, 'foo'
set :repository, '_site'
set :scm, :none
set :deploy_via, :copy
set :copy_compression, :gzip
set :use_sudo, false
set :host, '127.0.0.1'
role :web, host
role :app, host
@metaphox
metaphox / gist:1644401
Created January 20, 2012 01:34
Fixing the postgresql initdb fatal shared memory error on Leopard
Fixing the postgresql initdb fatal shared memory error on Leopard
Published Tue 18 December 2007 11:09 (+1300)
Tagged
software (43 posts and 3 photos)
mac os x (6 posts)
When doing the post-install setup of postgresql default database using initdb, you may hit this error:
FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=1, size=1646592, 03600).
@fredericoramos
fredericoramos / Ubuntu - Setup Brazilian Keyboard
Created February 27, 2013 16:49
UBUNTU - Setup Brazilian Portuguese layout keyboard / Configurando Teclado
==========================================================
UBUNTU - Configurando Teclado
Setup Brazilian Portuguese layout keyboard
==========================================================
# Install de VIM Editor
sudo aptitude install vim
# adicionar a numeração de linha
@steveklabnik
steveklabnik / Makefile
Last active December 23, 2015 21:19
I think this is actually how you Makefile
CHAPTERS=book/preamble.md \
$(wildcard book/chapter-*.md)
CONTENTS=book/title.txt \
$(CHAPTERS)
ALL_FILES=$(CHAPTERS) \
book/metadata.xml \
book/title.txt \
cover.png
@waylonflinn
waylonflinn / install-python-data-science.sh
Last active December 4, 2016 05:27
Install Data Science and NLP libraries for python3 in a virtualenv (Numpy, Scipy, Matplotlib, Pandas, Gensim, OpenBLAS and PyTables)
#!/usr/bin/env bash
## create an ubuntu 14.04 hvm instance, then from your home directory:
# 1. download this script
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh
# 2. make it executable
# chmod a+x install-python-data-science.sh
@lorn
lorn / stopwords.txt
Created May 27, 2011 16:21
pt-br stopwords
"abaixo", "aca", "acaso",
"acerca", "acima", "acola", "acula", "ademais", "adentro",
"adiante", "afinal", "afora", "agora", "agorinha", "ah", "ainda",
"alem", "algo", "alguem", "algum", "alguma", "algumas", "alguns",
"ali", "alias", "alo", "ambos", "amiude", "ante", "antes", "ao",
"aonde", "aos", "apenas", "apesar", "apos", "apud", "aquela",
"aquelas", "aquele", "aqueles", "aqui", "aquilo", "as", "assim",
"ate", "atras", "atraves", "basicamente", "bastante", "bastantes",
"bem", "bis", "bom", "ca", "cada", "cade", "caso", "certa",
"certamente", "certas", "certeiramente", "certo", "certos", "chez",
@jessykate
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created February 18, 2011 23:37
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end
@f4ktrh
f4ktrh / python3scientificstack.sh
Last active April 23, 2020 17:11
Isolated Python 3 (from source) with Scientific Stack in a Virtual-Environment (double isolation) on Ubuntu Precise (As of Feb 2014)
# DISCLAIMER:
# - Code is provided "as is" and any expressed or implied warranties are disclaimed.
# - Errors and omissions excepted.
# NOTE:
# - Read it carefully, some commands might have to be changed for your system.
# - BLAS/LAPACK compilation commands will most likely have to be changed based on the
# stackoverflow link below.
# - Running this shell file as a script is NOT recommended. Copy/pasting one command at a time is
# okay as long as you monitor the output for any possible errors/warnings.
@jstn
jstn / JSTN.css
Last active March 1, 2021 02:28
limechat theme
/*
JSTN THEME FOR LIMECHAT 1.0
put this and the other thing in ~/Library/Application Support/LimeChat/Themes/
bg 1a2230
hlight 273146
red e44347
purps 8b84d0
fuscia c2339a