Skip to content

Instantly share code, notes, and snippets.

View truedat101's full-sized avatar

David J. Kordsmeier truedat101

View GitHub Profile
@mvance
mvance / install-citools.sh
Created October 22, 2011 16:40
A bash script to set up Quickstart as a continuous integration appliance.
#!/bin/bash
# Follow the steps below to configure Quickstart as a continuous integration appliance, complete with Jenkins,
# Selenium Builder, Selenium Server, PHPUnit, and Selenium Zoetrope. The script also configures and runs an
# example Jenkins test job for Quickstart's example6.dev site, including Simpletest module testing and
# Coder module checks.
#
# 1. Download Quickstart and follow the installation instructions:
# http://drupal.org/project/quickstart
# 2. Open a Terminal window (Applications > Accessories > Terminal) and run the following command:
@max-mapper
max-mapper / readme.md
Created September 28, 2011 02:01
SLEEP - syncable.org

Your API does REST, but can it SLEEP?

SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.


SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.

If you synchronize data from a remote source and then the

@atommclain
atommclain / ZigBee_Lights.md
Last active February 12, 2017 21:58
An informal list of ZigBee lights

##Philips

###Hue http://www2.meethue.com/en-us/the-range/hue/

Name Capabilities Cost lumen output
A19 Connected Bulb Color

Tunable White

$59.95 600 @ 4000K
510 @ 3000K
360 @ 2000K
550 @ 6500K
BR30 Connected Bulb Color

Tunable White

$59.95 630 @ 4000K
538 @ 3000K
376 @ 2000K
581 @ 6500K
GU10 Connected Bulb ColorTunable White $59.95 300 @ 4000K 210 @ 3000K 145 @ 2000K 230 @ 6500K
@rehos
rehos / build-fat-static-lib.sh
Last active February 22, 2019 22:40
Script for XCode 5 to generate fat static library for iOS containing i386, x86_64, armv7, armv7s and arm64 architectures.
#!/bin/bash
#
# This script was inspired by http://blog.diogot.com/blog/2013/09/18/static-libs-with-support-to-ios-5-and-arm64/
#
# This script uses a temporary folder for intermediate build products.
#
# Minimum deployment target is 5.0 for 32 bit architectures and for 64 bit architectures it is 7.0.
#
@qiao
qiao / ip.js
Created January 17, 2012 11:27
Node.js get client IP address
// snippet taken from http://catapulty.tumblr.com/post/8303749793/heroku-and-node-js-how-to-get-the-client-ip-address
function getClientIp(req) {
var ipAddress;
// The request may be forwarded from local web server.
var forwardedIpsStr = req.header('x-forwarded-for');
if (forwardedIpsStr) {
// 'x-forwarded-for' header may return multiple IP addresses in
// the format: "client IP, proxy 1 IP, proxy 2 IP" so take the
// the first one
var forwardedIps = forwardedIpsStr.split(',');
@Couto
Couto / webpack.js
Last active November 11, 2020 17:53
Fetch polyfill with webpack
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
@Basemm
Basemm / readLineSync.js
Last active December 28, 2020 05:08
Read file line by line "synchronous"
/**
* Read file line by line "synchronous"
*
* require nodejs ~0.11, run with "node --harmony"
*
* Example:
*
* var readLineSync = require('./readLineSync');
*
*
@smockle
smockle / Flip.css
Created May 9, 2013 19:45
Flip demonstrates a flip animation using CSS. Tested in Google Chrome 26, IE 10, and Firefox Nightly.
/* entire container, keeps perspective */
body .flip-container {
width: 100%;
}
body .flip-container .flipper {
position: relative;
}
/* hide back of pane during swap */
@dwilliamson
dwilliamson / gist:e9b1ba3c684162c5a931
Last active December 20, 2021 19:38
Workflow for using git subtree on Windows
To include a library as a subtree, follow these steps:
1. Add the project as a remote
git remote add <remote-name> <source-repo>
2. Fetch the remote
git fetch <remote-name>
3. Add the project
git subtree add --prefix "path/to/project" <remote-name> <remote-branch-name> --squash
@Offbeatmammal
Offbeatmammal / html5videoEvents.html
Created September 13, 2012 23:03
A sample showing HTML5 video events and appropriate properties. Useful for testing different browser behaviors. The Java file is an Android webView that can be used to host the HTML sample
package com.offbeatmammal.android.webview;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.RelativeLayout;
public class WebViewActivity extends Activity {