Skip to content

Instantly share code, notes, and snippets.

Cédric Félizard infertux

View GitHub Profile
@infertux
infertux / rrd-dump.sh
Created Dec 19, 2016
Bash scripts to export/import RRD files for Collectd
View rrd-dump.sh
#!/bin/bash -eu
cd /var/lib/collectd/rrd/$HOST
for f in $(find -name *.rrd); do
echo "rrdtool dump $f"
rrdtool dump $f > ${f%.rrd}.xml
done
rsync -avz --exclude *.rrd /var/lib/collectd/rrd/$HOST/ $COLLECTD_HOST:/var/lib/collectd/rrd/$HOST/
View hello_world.rb
(2 * 2 * 5 * 7 * 37 * 149 * 5417 * 148781 * 51939996061871).to_s(16).scan(/../).map { |x| x.hex.chr }.join
@infertux
infertux / V3.car.diff
Created Apr 4, 2016
Turn Stunt Rally CAR game into a JET FIGHTER game ;)
View V3.car.diff
--- V3.car 2015-09-18 09:21:11.000000000 +0000
+++ V3.car 2016-04-01 14:51:17.783726416 +0000
@@ -61,16 +61,16 @@
#---------------------------
[ hover ]
-hAbove = 2.5
+hAbove = 4.0
hRayLen = 4.0
@infertux
infertux / axp_pmu
Created Feb 13, 2016
Munin plugin to monitor AXP PMU on sunxi SoCs
View axp_pmu
#!/bin/sh
# -*- sh -*-
# vim: ft=sh
: << =cut
=head1 NAME
axp_pmu - Plugin to monitor power
@infertux
infertux / rubocop.yml
Last active Oct 12, 2017
My curated Rubocop config
View rubocop.yml
# See https://github.com/bbatsov/rubocop
# Add this to the top of your .rubocop.yml:
# inherit_from:
# - https://gist.githubusercontent.com/infertux/cdd2ccc6e0a0cd94f458/raw
# AllCops
AllCops:
TargetRubyVersion: 2.3
@infertux
infertux / unicorn_connections
Created Aug 11, 2015
Munin plugin to monitor the number of Unicorn connections on a socket
View unicorn_connections
#!/bin/bash
# -*- sh -*-
# vim: ft=sh
: << =cut
=head1 NAME
unicorn_connections - Plugin to monitor the number of Unicorn connections
View gist:58665952a77f4842fb3b
http://www.workingnomads.co/
http://www.reddit.com/r/remotejs/
https://www.reddit.com/r/Jobs4Bitcoins/
https://jobs.github.com/positions?description=&location=remote
https://authenticjobs.com/#types=7,1,3,5&category=2&onlyremote=1
https://authenticjobs.com/#types=7,1,3,5&category=4&onlyremote=1
https://remotecoder.io/
https://weworkremotely.com/
https://remoteok.io/
http://careers.stackoverflow.com/jobs?allowsremote=true
@infertux
infertux / bootstrap_ruby.sh
Last active Aug 29, 2015
Download, configure and install Ruby and Bundler on a Debian-family or Redhat-family fresh system
View bootstrap_ruby.sh
#!/bin/bash -eu
# Download, configure and install Ruby and Bundler on a Debian-family or Redhat-family fresh system
# https://gist.github.com/infertux/a5252bf8023f0a0e9380
RUBY="2.2.2"
SHA256="5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44"
# This runs as root on the server
[ $UID -eq 0 ]
@infertux
infertux / extract_sub_repo.sh
Created Aug 28, 2014
Extract part of a Git repository while keeping the history
View extract_sub_repo.sh
# create a list of files to NOT keep
create_black_list > blacklist
# add old files which have been renamed
for f in $(cat blacklist); do
git log --pretty=oneline --follow --name-only $f | grep -v ' ' | sort -u >> blacklist
done
# remove files and commits from the Git history (may take a while...)
for f in $(cat blacklist); do
View gist:dc54c7789a2a6f4821c5
Verifying that +infertux is my Bitcoin username. You can send me #bitcoin here: https://onename.io/infertux
You can’t perform that action at this time.