Skip to content

Instantly share code, notes, and snippets.

@marsam
marsam / git-stats
Created October 26, 2013 14:25
git stats
#!/bin/sh
#
# Usage:
# git stats --author mario
# git stats --author pepe@lucho.org --since yesterday
git_statistics(){
git log --shortstat --oneline $@ |
grep -E "fil(e|es) changed" |
awk '
@marsam
marsam / groove.py
Last active December 25, 2015 15:59
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import print_function
import binascii
import hashlib
import json
import logging
import os
@marsam
marsam / fffffffuuuuuuuuuuuu
Created September 28, 2013 19:21
ruby fffffffuuuuuuuuuuuu
STDOUT: Fetching source index from https://rubygems.org/
Fetching https://github.com/SamSaffron/sprockets.git
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
STDERR: /opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in ``': Cannot allocate memory - git clone 'https://github.com/SamSaffron/sprockets.git' "/opt/discourse/vendor/bundle/ruby/2.0.0/cache/bundler/git/sprockets-b87f940fba3f9dfa02b09eb586b313ebb5878a08" --bare --no-hardlinks (Errno::ENOMEM)
from /opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in `git'
from /opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:49:in `checkout'
from /opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/source/git.rb:144:in `specs'
from /opt/rbenv/version
@marsam
marsam / campfire.notifier.py
Created August 28, 2013 16:32
campfire notifier
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gevent import monkey; monkey.patch_all() # noqa
import re
import signal
import logging
import gevent
from campfire import Campfire
@marsam
marsam / PKGBUILD
Last active December 21, 2015 15:58
emacs-daemon systemctl unit
# Maintainer: Mario Rodas <rodasmario2@gmail.com>
pkgname=emacs-daemon
pkgver=0.1
pkgrel=1
pkgdesc=""
arch=('any')
url="http://www.emacswiki.org/emacs/EmacsAsDaemon"
license=('APACHE')
depends=('emacs')
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous and myself. Never let these guys
// change jobs! :)
#define struct union
@marsam
marsam / PKGBUILD
Created August 4, 2013 01:20
PKGBUILD for texi2latex
# Maintainer: Mario Rodas <rodasmario2@gmail.com>
pkgname=texi2latex
pkgver=0.9.4
pkgrel=2
pkgdesc="convert texinfo sources to LaTeX"
url="http://savannah.nongnu.org/projects/texi2latex"
arch=('i686' 'x86_64')
license=('GPL')
depends=('gcc-libs' 'sh' 'java-saxon')
@marsam
marsam / PKGBUILD
Last active December 20, 2015 14:39
PKGBUILD for saxon home edition
# Maintainer: Mario Rodas <rodasmario2@gmail.com>
pkgname=saxon-he
pkgver=9.5.1.1
pkgrel=1
pkgdesc="XSLT 2.0 / XPath 2.0 / XQuery 1.0 processor for Java - Home edition"
arch=('any')
url="http://saxon.sourceforge.net/"
license=('MPL')
depends=('sh' 'java-environment')
@marsam
marsam / PKGBUILD
Last active December 20, 2015 14:19
PKGBUILD for libmaxminddb
# Maintainer: Mario Rodas <rodasmario2@gmail.com>
pkgname=libmaxminddb-git
_gitname=libmaxminddb
pkgver=r748.9472c2a
pkgrel=1
pkgdesc="C library for the MaxMind DB file format"
arch=('i686' 'x86_64')
url="https://github.com/maxmind/libmaxminddb"
license=('GPL')
@marsam
marsam / Cakefile
Last active December 20, 2015 01:09
Hubot Cakefile for heroku
# vim: ai ts=2 sts=2 et sw=2
#
# # Hubot Cakefile
#
# Heroku init
#
# $ heroku create --stack cedar
# $ git push heroku master
# $ heroku ps:scale app=1
# $ heroku addons:add redistogo:nano