Skip to content

Instantly share code, notes, and snippets.

Russell Beattie russellbeattie

Block or report user

Report or block russellbeattie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View router.js
export default class Router {
this.routes = [];
this.current = null;
add(route, handler) {
let re = new RegExp(route + '$');
russellbeattie / dwitterish.html
Last active Feb 22, 2017 practice page
View dwitterish.html
<!DOCTYPE html>
background-color: #fff;
font-family: sans-serif;
russellbeattie / throttle.js
Last active Aug 18, 2016
A better, self-contained, JavaScript function throttle
View throttle.js
function throttle(fn, limit, scope) {
var last;
var deferTimer;
return function() {
var context = scope || this;
var args = arguments;
russellbeattie / search-apple-mail-body.js
Created Jun 1, 2016
Searches Apple mail Inbox for your name (if your name is Russ - otherwise change that bit) in the latest message and logs out/marks yellow.
View search-apple-mail-body.js
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
var Mail = new Application("Mail");
var inbox = Mail.inbox();
var messages = inbox.messages();
russellbeattie / getfeed-nolibs.js
Created Dec 9, 2015
Just a quick library-free script to grab a feed and parse it
View getfeed-nolibs.js
var https = require('https');
var http = require('http');
var url = require('url');
var feedUrl = '';
function main(){
russellbeattie / aws-twitter-search-bot.js
Last active Jan 19, 2016
AWS Lambda Twitter Search Bot... uses S3 for persistence and SNS to send out messages.
View aws-twitter-search-bot.js
var querystring = require('querystring');
var https = require('https');
var aws = require('aws-sdk');
var s3 = new aws.S3();
var sns = new aws.SNS({
region: 'us-east-1'
var query = '#SEARCH TERM HERE';
russellbeattie / Dispatcher.js
Last active Nov 5, 2015
Clean version of Flux Dispatcher
View Dispatcher.js
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
* This source code is licensed under the BSD-style license found in
* An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
russellbeattie / gist:11205288
Created Apr 23, 2014
Enabling remote debugging in apps using Cordova targeting Amazon Fire OS
View gist:11205288
package com.example.helloworld;
import android.os.Bundle;
import org.apache.cordova.*;
public class HelloActivity extends CordovaActivity
public void onCreate(Bundle savedInstanceState)
View schema.go
package feeds
var Ns = map[string]string{
// via
"": "opensearch",
"": "opensearch10",
"": "blogChannel",
"": "creativecommons",
"": "creativeCommons",
You can’t perform that action at this time.