Skip to content

Instantly share code, notes, and snippets.

View michaelowens's full-sized avatar

Michael Owens michaelowens

View GitHub Profile
@michaelowens
michaelowens / index.js
Last active August 29, 2015 14:27
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var Vue = require('vue');
// e.g. logged-in.js
var loggedIn /*module.exports*/ = function (user) {
// check if user is logged in
return true;
}

Keybase proof

I hereby claim:

  • I am michaelowens on github.
  • I am michaelowens (https://keybase.io/michaelowens) on keybase.
  • I have a public key whose fingerprint is B871 D93E 8293 5F96 D6BE EF7E 4D0F 2E4F FBE4 5D8C

To claim this, I am signing this object:

defmodule Plugin do
alias Plugin
use XikBot.Database
def everyX(name, ms, cb) do
IO.puts "--- everyX ---"
Amnesia.transaction do
selection = Timer.where cmd == name
@michaelowens
michaelowens / database.ex
Created May 15, 2015 14:26
Amnesia transactions not running
use Amnesia
defdatabase XikBot.Database do
deftable Timer, [{ :id, autoincrement }, :cmd, :interval, :last_run], type: :bag do
@type t :: %Timer{id: non_neg_integer, cmd: String.t, interval: integer, last_run: integer}
end
end
@michaelowens
michaelowens / _.md
Created June 13, 2014 14:19
d3 bar chart
#
# Install node.js which has npm bundled
#
#Build Dependencies
sudo apt-get update && sudo apt-get install git-core curl build-essential openssl libssl-dev
#Install Node.js & NPM
@michaelowens
michaelowens / gist:6866294
Last active December 24, 2015 21:29
PB floating class for control-bar
<script>
$(function () {
var $controlBar = $('.control-bar'),
isFloating,
controlBarTimer;
controlBarTimer = setInterval(function () {
if (!$controlBar.attr('style') && isFloating) {
$controlBar.removeClass('floating');
isFloating = false;