Skip to content

Instantly share code, notes, and snippets.

View infertux's full-sized avatar
:shipit:

Cédric Félizard infertux

:shipit:
View GitHub Profile
@infertux
infertux / axp_pmu
Created February 13, 2016 22:38
Munin plugin to monitor AXP PMU on sunxi SoCs
#!/bin/sh
# -*- sh -*-
# vim: ft=sh
: << =cut
=head1 NAME
axp_pmu - Plugin to monitor power
@infertux
infertux / dateMenu.js.diff
Last active December 30, 2015 21:29
Gnome Shell: use a different time-zone for clock than the system time-zone
--- /usr/share/gnome-shell/js/ui/dateMenu.js.dist 2013-12-10 08:27:47.162670528 +0000
+++ /usr/share/gnome-shell/js/ui/dateMenu.js 2013-12-10 08:29:44.332848149 +0000
@@ -209,7 +209,11 @@
},
_updateClockAndDate: function() {
- this._clockDisplay.set_text(this._clock.clock);
+ let dateFormat = _("%a %d %l:%M:%S %p");
+ let date = new Date();
+ let offset = 3600*1000*N; // change N with the offset from UTC in hours
@infertux
infertux / .rspec
Created November 13, 2012 23:08
Common RSpec config
--color
--format d
--drb
--profile
--order random
#!/bin/bash
# This is a WTF Bash script licensed under the WTFPL license (what else?).
# WTF:
# 1. Watching http://youtu.be/lTx3G6h2xyA
# 2. "Hey, what a nice device..."
# 3. See http://amzn.com/B0046ZIZO8
# 4. "Doh! $159! Way too expensive for a broke student... :/"
# 5. ...
@infertux
infertux / kernel-hackers-quotes.sh
Created June 5, 2012 20:12
Kernel hackers quotes
#!/bin/bash
# Outputs some joyful hackers quotes.
# Count is 276 for v3.5-rc1-37-g99becf1 (2012-06-04).
# Path to the source
SOURCE=../Kernel
###
@infertux
infertux / pomodoro.sh
Created June 3, 2012 21:47
Cheap pomodoro timer
#!/bin/bash
# Cheap pomodoro timer
# https://en.wikipedia.org/wiki/Pomodoro_Technique
set -eu
trap bye INT TERM
bye() {
@infertux
infertux / ci_hook.bat
Created December 2, 2011 11:12
EC2 Windows CI hackish scripts
@echo off
REM If you edit this file, make sure to run `unix2dos` to fix those fucking CRLF.
REM Let's keep this script as dumb as possible and do all the logic with a true language.
REM Basically, this should be no more than a sort of remote control.
echo Initializing hook...
:begin
@infertux
infertux / unicorn_connections
Created August 11, 2015 12:56
Munin plugin to monitor the number of Unicorn connections on a socket
#!/bin/bash
# -*- sh -*-
# vim: ft=sh
: << =cut
=head1 NAME
unicorn_connections - Plugin to monitor the number of Unicorn connections
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 August 29, 2015 14:06
Download, configure and install Ruby and Bundler on a Debian-family or Redhat-family fresh system
#!/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 ]