Skip to content

Instantly share code, notes, and snippets.

View mathieuravaux's full-sized avatar

Mathieu Ravaux mathieuravaux

  • Paris
View GitHub Profile
(ns ansible.core
(:require [clojure.java.shell :as sh]
[clojure.string :as str]
[cheshire.core :as cheshire]
[clojure.java.io :as io])
(:import (java.io File)
(com.fasterxml.jackson.core JsonGenerator)
(java.util Base64)
(java.security MessageDigest MessageDigest$Delegate)))
@mathieuravaux
mathieuravaux / datomic.clj
Created April 27, 2018 15:10 — forked from robert-stuttaford/datomic.clj
Handy protocols for working with Datomic
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Connection
(defprotocol DatomicConnection
(as-conn [_]))
(extend-protocol DatomicConnection
datomic.Connection
(as-conn [c] c)
datomic.db.Db
@mathieuravaux
mathieuravaux / backend-architectures.md
Created November 26, 2015 15:38 — forked from ragingwind/Backend Architectures Keywords and References.md
Backend Architectures Keywords and References. #wiki
@mathieuravaux
mathieuravaux / README.md
Last active August 29, 2015 14:07 — forked from mbostock/.block
We couldn’t find that file to show.
@mathieuravaux
mathieuravaux / syntax.rb
Created April 17, 2012 16:15 — forked from slemiere/syntax.rb
redis queues syntax
all_queues = ["test", "schedule", "process"]
QUEUES = "*"
# ["test", "schedule", "process"]
QUEUES = "test,schedule"
# ["test", "schedule"]
QUEUES = "*,~test"
# ["schedule", "process"]
diff --git a/array.c b/array.c
index b1616c5..16326fc 100644
--- a/array.c
+++ b/array.c
@@ -302,7 +302,7 @@ ary_alloc(VALUE klass)
return (VALUE)ary;
}
-static VALUE
+VALUE
require 'rake/clean'
HAML = FileList['**/*.haml']
LESS = FileList['**/*.less']
COFFEE = FileList['**/*.coffee']
HTML = HAML.ext('html')
CSS = LESS.ext('css')
JS = COFFEE.ext('js')

install cycript

brew install https://gist.github.com/raw/890258/cycript.rb

download the cycript hack

wget https://gist.github.com/raw/890258/hack_propane.js
chmod +x hack_propane.js

inject hack into running propane process

require('soda').createSauceClient({ 'username': 'username-string', 'access-key': 'access-key-string',
'url': 'http://example.saucelabs.com/', 'max-duration': 300,
'os': 'Windows 2003', 'browser': 'firefox', 'browser-version': '3.6',
'name': 'This is an example test' }).chain.session()
.open('/')
.getTitle(function(title){
require('assert').ok(~title.indexOf('Cross browser testing with Selenium - Sauce Labs'), 'Title did not include the query');
})
.testComplete()
.end(function(err){
# app/views/rescues/_trace.erb
<%
traces = [
["Application Trace", @exception.application_backtrace],
["Framework Trace", @exception.framework_backtrace],
["Full Trace", @exception.clean_backtrace]
]
names = traces.collect {|name, trace| name}
%>