Skip to content

Instantly share code, notes, and snippets.

View domq's full-sized avatar

Dominique Quatravaux domq

View GitHub Profile
@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 / 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 / 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 / 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
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"));
});