Skip to content

Instantly share code, notes, and snippets.

View gdoteof's full-sized avatar

geoff golder gdoteof

  • vision.ai
  • Burlington, VT
View GitHub Profile
@gdoteof
gdoteof / tweet.php
Last active August 29, 2015 14:12
tweet.php
<?php
header('Access-Control-Allow-Origin: *');
require("twitter-php/src/twitter.class.php");
#tokens for twitter api
$consumerKey = '123-xxx';
$consumerSecret = 'yyyy';
$accessToken = '123-abc';
$accessTokenSecret = '123';
@gdoteof
gdoteof / cloudconfig
Last active August 29, 2015 14:14
cloud config
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/27c1dc9184248bb4e84f60e587f776fc
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
Description=My thing
# Requirements
Requires=etcd.service
Requires=docker.service
# Dependency ordering
After=etcd.service
After=docker.service
@gdoteof
gdoteof / tst@.service
Last active August 29, 2015 14:16
template test
[Unit]
Description=testthing
# Requirements
Requires=etcd.service
# Dependency ordering and binding
After=etcd.service
[Service]
core@ztest01 ~ $ fleetctl load test.service
Unit test.service loaded on 96fb30af.../10.132.114.122
core@ztest01 ~ $ fleetctl start test.service
Unit test.service launched on 96fb30af.../10.132.114.122
core@ztest01 ~ $ cat test.service
[Unit]
Description=test
# Requirements
Requires=etcd.service
--use like eval(HRANDKEY, 2, key_for_set_with_keys, key_for_hash_with_keys)
local randkey = redis.call('srandmember', KEYS[1])
local val = redis.call('hget', KEYS[2], randkey)
return val
@gdoteof
gdoteof / othervideo.js
Last active August 29, 2015 14:20
use another video src
var SERVER = "http://localhost:3000/"
$vmx.config = injector.get('vmxconfig');
$vmx.streamProvider = injector.get('vmxVideoStreamProvider');
var YOUR_VIDEO_ELEMENT = document.getElementById("id of the video you want to use");
var stream = $vmx.streamProvider.getInstance(YOUR_VIDEO_ELEMENT);
$vmx.config.setVideoSrc(stream);
#!/bin/sh
#
# A simple command line utility to send an image to VMX For this
# example to work, make sure the VMX variable points to the location
# of your server.
#
# Tom Malisiewicz tom@vision.ai
# vision.ai 2015
#The location of the VMX server
@gdoteof
gdoteof / doit.js
Last active April 4, 2016 04:25
robin auto grow .. does nothing
$("#robinSendMessage").append('<div onclick={$(".text-counter-input").submit();} class="robin-chat--vote" style="font-weight: bold; padding: 5px;cursor: pointer; margin-left:0;" id="sendBtn">Send Message</div>'); // Send
setInterval(function () {
document.getElementsByClassName("robin--vote-class--increase")[0].click();
console.log("you auto clicked grow!");
//DELETE THESE TWO LINES TO TURN OFF SPAM
document.getElementsByClassName("c-form-control text-counter-input")[0].value = "Go here to autogrow: https://gist.github.com/gdoteof/439b4b3a58610f8a5763a709e971433b";
$(".text-counter-input").submit();
//
@gdoteof
gdoteof / itest.js
Last active September 30, 2016 18:35
var spawn = require('child_process').spawn;
var test = spawn('./test.sh', ['--fashion-last "purestyle_lists/MASTER 9.28.16.csv" "purestyle_lists/men_tracker_master.csv"', '--ecomm-last "purestyle_lists/men_selling_master.csv"']);
test.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
test.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);