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 / gist:dc54c7789a2a6f4821c5
Created August 24, 2014 14:25
onename.io verification
Verifying that +infertux is my Bitcoin username. You can send me #bitcoin here: https://onename.io/infertux
@infertux
infertux / bitcoin-qt
Created July 28, 2014 19:26
bitcoin-qt wrapper to support multiple wallets
#!/bin/bash -eu
shopt -s extglob # enables pattern lists like +(...|...)
###
# NOTE: Adapt constants below:
BITCOIN_BIN="/home/xxx/bitcoin-0.9.2.1-linux/bin/64/bitcoin-qt"
WALLET_PREFIX="/home/xxx/.bitcoin."
WALLETS=(coinbase kraken etc)
@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 / select2_helper.rb
Last active November 17, 2022 20:46
Helper to select a Select2 item with Capybara/Cucumber
# spec/support/capybara/select2_helper.rb or features/support/select2_helper.rb
module Select2Helper
# @example
# select2 "Item", from: "select_id"
# select2 /^Item/, from: "select_id"
#
# @note Works with Select2 version 3.4.1.
def select2(text, options)
find("#s2id_#{options[:from]}").click
@infertux
infertux / gem.rb
Created November 28, 2012 22:15
Obfuscated Ruby
# -*- coding: UTF-8 -*-
def    
require   # what?
end
%w(open-srx gnmt). # interesting...
each_with_index{
|a, а| (42**а*1337). # some magic numbers there - wait... |a, a| really?
times {a.succ!}
@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