Skip to content

Instantly share code, notes, and snippets.

View zoni's full-sized avatar

Nick Groenen zoni

View GitHub Profile
@pierreozoux
pierreozoux / csv2html.rb
Last active December 13, 2015 16:59
2 little quick and dirty script. A shell script to push ressources usage from a process running to a csv file. And a ruby script to draw a graph from a csv file.
#!/usr/bin/env ruby
require 'erb'
require 'csv'
csv_path = ARGV[0]
@csv_array = CSV.read(csv_path)
@csv_array.each_with_index do |row,row_index|
@zoni
zoni / tweak.sh
Created November 5, 2012 19:10
Make gnome-shell more usable
#/bin/sh
# Turn on debugging, makes it clearer what is happening
set -x
# I don't want the overlay bound to Super_L, it messes with other shortcuts
gsettings set org.gnome.mutter overlay-key ''
# That huge 24-pixel notification area sucks. Whoever thought that was a good idea....
sudo sed -i -e 's/SOURCE_ICON_SIZE:\ 48,/SOURCE_ICON_SIZE:\ 24,/g' /usr/share/gnome-shell/js/ui/messageTray.js
@spilliams
spilliams / stickyfoundationfooter.js
Created May 14, 2012 22:13
Make Ryan Fait's Sticky Footer work with ZURB Foundation
/* Sticky Footer Foundation fix */
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
window.onresize = function(){
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
}
@yeban
yeban / jekyll.tag-cloud.rb
Created April 3, 2012 07:36
Flexible, logarithmic distribution, tag cloud for Jekyll.
# Copyright (C) 2011 Anurag Priyam - MIT License
module Jekyll
# Jekyll plugin to generate tag clouds.
#
# The plugin defines a `tag_cloud` tag that is rendered by Liquid into a tag
# cloud:
#
# <div class='cloud'>
@denik
denik / gevent-multiprocess.py
Created August 25, 2011 04:24 — forked from notedit/gevent-multiprocess.py
gevent-multiprocess
import sys
from gevent import server
from gevent.baseserver import _tcp_listener
from gevent.monkey import patch_all; patch_all()
from multiprocessing import Process, current_process, cpu_count
def note(format, *args):
sys.stderr.write('[%s]\t%s\n' % (current_process().name, format%args))
@jaspervdj
jaspervdj / volume.rb
Created February 7, 2011 16:17
Set pulseaudio volume from the command line
#!/usr/bin/ruby
# Pulseaudio volume control
class Pulse
attr_reader :volumes, :mutes
# Constructor
def initialize
dump = `pacmd dump`.lines
@volumes = {}
@ilkka
ilkka / tag_cloud_tag.rb
Created November 22, 2010 20:07
Jekyll tag cloud / tag pages plugin
module Jekyll
class TagCloudTag < Liquid::Tag
safe = true
def initialize(tag_name, text, tokens)
super
end
def render(context)
html = ""
require 'growl'
module Jekyll
class GrowlGenerator < Generator
safe false
def generate(site)
Growl.notify 'Building...', :title => 'Jekyll'
end
end