Skip to content

Instantly share code, notes, and snippets.

View drouillard's full-sized avatar

Douglas Drouillard drouillard

View GitHub Profile
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile(true) do
ruby '2.4.2'
source ''
gem 'capybara'
gem 'faraday'
shmookey / translate.lhs
Last active January 18, 2020 19:24
off-chain storage for ethereum smart contracts
External storage on the EVM: a static recompilation approach 7 May 2017
Luke Williams <> Rev. 3
This document describes a way of converting ordinary compiled EVM contracts to
a form suitable for use with an off-chain storage backend, such as the system
described by Smolenski for storing contract state on IPFS. This technique is
completely invisible to the contract developer and requires no modification to
contract logic. It is also generic to any EVM contract, regardless of the high
level language it was written in, and compatible with the public blockchain.
tecsyscom / gist:f0b5cce84821ad715d89532865376074
Created April 12, 2017 14:01
sample SAML request from keyCloak
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Destination="" ID="ID_15d519a5-88ac-4d2d-8206-409e570a0987" IssueInstant="2017-04-12T09:36:17.883Z" Version="2.0"><saml:Issuer></saml:Issuer><dsig:Signature xmlns:dsig=""><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm=""/><dsig:SignatureMethod Algorithm=""/><dsig:Reference URI="#ID_15d519a5-88ac-4d2d-8206-409e570a0987"><dsig:Transforms><dsig:Transform Algorithm=""/><dsig:Transform Algorithm=""/></dsig:Transforms><dsig:DigestMethod Algorithm=""/><dsig:DigestValue>3cCxC7wj/4NIZAvVdU1xdlbfihU7q5OllDCLJ1TdbUw=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:Si
paoloantinori /
Created January 26, 2016 15:59
Keycloak Admin API Rest Example
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin" \
-d 'password=admin' \
-d 'grant_type=password' \
-d 'client_id=admin-cli' | jq -r '.access_token')
curl -X GET 'http://localhost:8080/auth/admin/realms' \
gaearon / ReduxMicroBoilerplate.js
Last active March 26, 2020 00:35
Super minimal React + Redux app
import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux';
import { provide, connect } from 'react-redux';
import thunk from 'redux-thunk';
const AVAILABLE_SUBREDDITS = ['apple', 'pics'];
// ------------
// reducers
// ------------
kristopherjohnson / RoundRectButton.swift
Last active January 4, 2021 14:35
Swift: Custom UIButton subclass that displays a rounded rectangle in the background
import UIKit
/// UIButton subclass that draws a rounded rectangle in its background.
public class RoundRectButton: UIButton {
// MARK: Public interface
/// Corner radius of the background rectangle
public var roundRectCornerRadius: CGFloat = 8 {
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 6.0 ( -
Google Apps for Android 5.1 ( -
Google Apps for Android 5.0 ( -