Skip to content

Instantly share code, notes, and snippets.

View domq's full-sized avatar

Dominique Quatravaux domq

View GitHub Profile
it("test 1", function() {
process.nextTick(function() {
throw new Error("Too bad");
});
});
it("test 2", function() {});
it("test 3", function(done) {
process.stdout.write("This actually runs twice.\n");
process.nextTick(done.bind({},"OUCH"));
});
@domq
domq / test.rb
Last active August 29, 2015 14:19
epflsti/cluster.foreman: run step 4 of foreman_setup wizard
# coding: utf-8
# TODO: turn this into a "rails runner" script
class ForemanSetup::ProvisionersController
# Re-open the class and neuter the "all done, transfer to view" plumbing:
def step5_foreman_setup_provisioner_path
end
def process_success(ignored)
end
@domq
domq / gist:40b4a0d988a85eca2cf3
Created May 7, 2015 15:34
Soften rubygem(thor) dependency
--- rubygem-bundler.spec.ORIG 2012-07-02 21:32:15.000000000 +0200
+++ rubygem-bundler.spec.NEW 2015-05-07 17:24:29.115039918 +0200
@@ -10,14 +10,14 @@
Summary: Library and utilities to manage a Ruby application's gem dependencies
Name: rubygem-%{gemname}
Version: 1.0.15
-Release: 3%{?dist}
+Release: 3domq
Group: Development/Languages
License: MIT
@domq
domq / journalctl.log
Created September 16, 2015 18:01
Logs from random proxy cluster member - Leaves cluster upon loss of quorum, I think?
core@c06 ~ $ journalctl -u etcd2 --since="2015-09-10"
Sep 09 04:25:53 c06.ne.cloud.epfl.ch etcd2[3406]: 2015/09/09 04:25:53 proxy: marked endpoint http://192.168.11.1:2379 available
Sep 09 04:25:54 c06.ne.cloud.epfl.ch etcd2[3406]: 2015/09/09 04:25:54 proxy: marked endpoint http://192.168.11.8:2379 available
[No news for two days, which is great]
[At this point, node #7 goes off-line]
Sep 11 14:11:09 c06.ne.cloud.epfl.ch etcd2[3406]: 2015/09/11 14:11:09 proxy: failed to direct request to http://192.168.11.7:2379: net/http: request canceled while waiting for connection
Sep 11 14:11:09 c06.ne.cloud.epfl.ch etcd2[3406]: 2015/09/11 14:11:09 proxy: marked endpoint http://192.168.11.7:2379 unavailable
Sep 11 14:11:10 c06.ne.cloud.epfl.ch etcd2[3406]: 2015/09/11 14:11:10 proxy: failed to direct request to http://192.168.11.7:2379: net/http: request canceled while waiting for connection
@domq
domq / measurements.rb
Last active January 3, 2016 17:23
Update SketchUp measurements that are marked up with a pair of brackets
# coding: utf-8
require 'Logger'
# To turn on debugging, open Window → Ruby Console and say
#
# UpdateMeasurements.log.level = Logger::DEBUG
module UpdateMeasurements
# http://stackoverflow.com/a/6768164/435004
def log
@domq
domq / search.js
Last active February 6, 2016 12:44
Search-as-you-type for Meteor
/**
* Search-as-you-type support.
*
* Inspired from meteorhacks:search-source, but uses a subscription instead of
* a call. Streams results. Signals end of search with success or error.
* Throttles searches to match the server-side speed.
*/
Search = function Search(name) {
this.name = name;
@domq
domq / # libtool - 2016-06-29_09-53-59.txt
Created June 29, 2016 07:55
libtool on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for libtool on Mac OS X 10.10.5
Build date: 2016-06-29 09:53:59
@domq
domq / # libtool - 2016-06-29_10-40-23.txt
Last active June 29, 2016 08:41
libtool on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for libtool on Mac OS X 10.10.5
Build date: 2016-06-29 10:40:23
;; .emacs, fichier de configuration d'emacs de Dom
;;
;; MODE D'EMPLOI
;;
;; Ce .emacs ambitionne de fonctionner tel quel sur toute installation fraîche
;; d'Emacs 23 ou ultérieur.
;;
;; Ce .emacs fonctionne main dans la main avec la fonction "Customize" d'Emacs,
;; de sorte qu'il est possible de tout personnaliser sans modifier ni même
;; comprendre l'Emacs Lisp. Essayez les combinaisons de touches suivantes :
#!/usr/bin/perl -w
use strict;
use utf8;
use Encode qw(decode);
use Text::CSV;
use Net::LDAP;
use Error qw(:try);