Skip to content

Instantly share code, notes, and snippets.

View michaelowens's full-sized avatar

Michael Owens michaelowens

View GitHub Profile
@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;
#
# 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 / _.md
Created June 13, 2014 14:19
d3 bar chart
@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
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

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:

@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;
}
@michaelowens
michaelowens / keybase.md
Created September 28, 2015 08:18
Keybase proof

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 47A3 E05E F7BF CDC8 B79B 3D9F AF4C BFB3 A9BC 87FA

To claim this, I am signing this object:

import BaseModule from './base'
import Commands from '../models/command'
import Database from '../models/database'
import Log from '../models/log'
import Chat from '../models/chat'
import {RateLimiter} from 'limiter'
import seedrandom from 'seedrandom'
import {ModuleSetting} from '../models/module'
export const SETTINGS = {
@michaelowens
michaelowens / README.md
Last active September 25, 2022 14:49
Chat commands for Twitch : Pyramid generator, rainbow messages, brainpower, and more to come