Skip to content

Instantly share code, notes, and snippets.

@CJentzsch
CJentzsch / Refund.sol
Created July 5, 2016 15:54
Refund contract
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@preshing
preshing / build_cross_gcc
Last active April 11, 2024 02:14
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@iHiD
iHiD / config.rb
Last active June 10, 2017 15:05
Baruco 2014 Live Coding Talk on Propono.
require 'propono'
Propono.config do |config|
config.access_key = "AKIAIPE2MSOM5ZFGQBCQ"
config.secret_key = "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"
config.queue_region = "eu-west-1"
end
require 'twitter'
@twitter = Twitter::REST::Client.new do |config|
config.consumer_key = "OG9Zkag09onRe7b5ZLecO7HGb"
@alandipert
alandipert / interfaces
Created March 12, 2013 20:14
raspbian configuration for bridging eth0 and wlan0
# /etc/network/interfaces
# Configured for bridging wifi<->ethernet
# Tested with:
# - RPi Model B Rev. 1
# - 2013-02-09-wheezy-raspbian
# - Edimax 8192-series USB wireless adapter
# - /etc/modprobe.d/8192cu.conf contents:
# - options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
# - firmware: c2d133fb4efe9c9995da7fd7e1c45d74254f5c4b
@cpetschnig
cpetschnig / gist:3952049
Created October 25, 2012 11:15
Proposal for better structure of seeds in Rails engines
Engine
======
File structure:
EngineFoo
- app
- db
- seeds.rb