Skip to content

Instantly share code, notes, and snippets.

View rubiojr's full-sized avatar
🚀
>>>>>>>>> ⚠️ 💥 ☠️

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
@matthewmccullough
matthewmccullough / gist:47267
Created January 15, 2009 05:15 — forked from halbtuerke/gist:31934
Show Git dirty status in your Unix bash prompt (symbols not compatible with CygWin)
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
@torsten
torsten / proxy.rb
Last active April 30, 2024 17:53
A quick HTTP proxy server in Ruby.
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# Used to graph results from autobench
#
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv
#
# This will generate three svg & png graphs
require "rubygems"
require "scruffy"
require 'csv'
require 'yaml'
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@koshigoe
koshigoe / mount-ram.sh
Created February 11, 2011 14:57
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@rubiojr
rubiojr / trackpoint.conf
Created February 12, 2011 19:17
Adjust Lenovo/IBM Thinkpad trackpoint (upstart service)
description "IBM/Lenovo trackpoint sentivity adjustment"
start on runlevel 2
script
SYS_FILE="/sys/devices/platform/i8042/serio1/sensitivity"
if test -f $SYS_FILE; then
sudo echo -n 200 > $SYS_FILE
else
logger "Trackpoint sensitivity couldn't be adjusted."
@telamon
telamon / rdhcpd.rb
Created May 20, 2011 23:58
Pure ruby DHCP server
' Copyright (c) 2007, Tony Ivanov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
@nacx
nacx / massive-volume-creation.sh
Created June 28, 2011 13:59
Massive volume creation in Abiquo
#!/bin/bash
NUM=20 # The number of volumes to create
DC=2 # The datacenter where the volumes will be created
TIER=1 # The tier where the volumes will be created
VDC=4 # The virtual datacenter where the volumes will be created
SIZE=100 # The size of the volumes to create in MB
LOGIN=admin:xabiquo # The credentials
for V in `seq 1 ${NUM}`; do
@dplummer
dplummer / tcmalloc.patch
Created June 30, 2011 20:50
ree tcmalloc patch fix for glibc 2.14
diff -urB a/distro/google-perftools-1.7/src/tcmalloc.cc b/distro/google-perftools-1.7/src/tcmalloc.cc
--- a/distro/google-perftools-1.7/src/tcmalloc.cc
+++ b/distro/google-perftools-1.7/src/tcmalloc.cc
@@ -137,6 +137,13 @@
# define WIN32_DO_PATCHING 1
#endif
+// GLibc 2.14+ requires the hook functions be declared volatile, based on the value of the
+// define __MALLOC_HOOK_VOLATILE. For compatibility with older/non-GLibc implementations,
+// provide an empty definition.
@rubiojr
rubiojr / repo_feeds.txt
Created August 11, 2011 09:22
RPM Repo Feeds for Fedora/RHEL
#
# Compilation of Yum Repositories for RHEL/Fedora
#
#
# Fedora
#
http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Fedora/x86_64/os, f15-x86_64, fedora-15
http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Fedora/i386/os, f15-i386, fedora-15
http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Fedora/source/SRPMS, f15-src, fedora-15