Skip to content

Instantly share code, notes, and snippets.

View mattsahr's full-sized avatar

Matt Sahr mattsahr

View GitHub Profile
@mattsahr
mattsahr / filter.prefs.md
Last active June 22, 2016 20:57
Filter preferences

A filter store in the app currently looks like this

fiters: {
	...
	filters: {
		'555pageId': {
			"member_region": {
				"items": {
					"domestic": false,
@mattsahr
mattsahr / gist:d88c7e868c92dde2757e
Created May 20, 2015 13:42 — forked from colinramsay/gist:42d3dbd0316212d65161
ReactJS -- Animation Wrapper Class
let AnimationWrapper = React.createClass({
render() {
console.log(this.props.childClassName + ' render');
return this.props.children;
},
componentWillAppear (callback) {
console.log(this.props.childClassName + ' willappear');
callback();
<?php
/**
* SOURCE https://github.com/ArmedGuy/discourse_sso_php/blob/master/discourse_sso.php
* This Discourse_SSO class gets used in the full module below
*/
class Discourse_SSO {
private $sso_secret;

Keybase proof

I hereby claim:

  • I am mattsahr on github.
  • I am mattsahr (https://keybase.io/mattsahr) on keybase.
  • I have a public key whose fingerprint is 4D14 D986 4C63 9CCA D7F2 0965 2E43 EFDD 8E0C 609A

To claim this, I am signing this object:

@mattsahr
mattsahr / index.html
Last active August 29, 2015 13:57
DB.info() test
<html>
<body>
<h1>db.info() test</h1>
<p>Using pouchdb-3.1.0</p>
<p id="putResult"></p>
<p id="getResult"></p>
<p id="getInfoPrep"></p>
@mattsahr
mattsahr / android.remote.debug.md
Last active December 30, 2015 04:29
Chrome Remote Debugging on Android

Chrome Remote Debugging on Android

The framework for debugging web pages (and phoneGap apps) on Android is finally getting easier.

https://developers.google.com/chrome-developer-tools/docs/remote-debugging

Following the instructions will get you there, but the notes below might help spell out some of the steps. Here's what you need.

  1. Chrome 31 or higher on your desktop.
@mattsahr
mattsahr / easing.js
Created August 27, 2013 18:28 — forked from gre/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@mattsahr
mattsahr / swipeFunc.js
Last active December 21, 2015 17:28 — forked from localpcguy/swipeFunc.js
Menu Swipe Handler
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
@mattsahr
mattsahr / require.main.js
Created December 2, 2012 18:04
requireJS Example
/*
* This is an example build file that demonstrates how to use the build system for
* require.js.
*
* copied from here: https://github.com/jrburke/r.js/blob/master/build/example.build.js
* THIS BUILD FILE WILL NOT WORK. It is referencing paths that probably
* do not exist on your machine. Just use it as a guide.
*
*
*/
@mattsahr
mattsahr / CustomWidgetFile.php
Created August 11, 2012 01:59 — forked from jonathonbyrdziak/CustomWidgetFile.php
EMPTY WIDGET Plugin code to create a single widget in wordpress.
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com