Skip to content

Instantly share code, notes, and snippets.

View lgleasain's full-sized avatar

Lance Gleason lgleasain

View GitHub Profile
@lgleasain
lgleasain / gist:34d0aa4971db7ef7f447
Created October 10, 2014 21:33
Bad Ass GOL implementation
class Cell
def initialize
become_dead
end
def eigenclass
class << self
self
end
end
@lgleasain
lgleasain / gist:5d5c68548a5aa46999b9
Created June 7, 2014 15:38
Cat Tracking For Wearscript
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<style>
body {background-color: black;}
.h1 {color:white; font-size: 100px; font-family: 'Roboto', sans-serif; font-weight: 100;}
</style>
@lgleasain
lgleasain / bluetooth
Created June 6, 2014 19:30
[wearscript] ble
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function server() {
@lgleasain
lgleasain / glass.html
Created March 25, 2014 00:05
[wearscript] playground
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300' rel='stylesheet' type='text/css'>
</head>
<style>
body {background-color: black;}
@lgleasain
lgleasain / gist:4721664
Created February 6, 2013 10:20
Sample Postgres config
development:
adapter: postgresql
database: development
encoding: utf8
pool: 5
host: localhost
port: 5432
username: <your user id>
password: <your password>
@lgleasain
lgleasain / gist:3307526
Created August 9, 2012 19:53
extensions.con
[lsrc_context]
exten => _.,1,AGI(agi:async)
;exten => _.,1,AGI(agi://localhost/adhearsion)
[adhearsion-redirect]
@lgleasain
lgleasain / gist:3307518
Created August 9, 2012 19:51
manager.conf
[myuser]
secret = mypassword
read = all
write = all
eventfilter = !Event: RTCP*
@lgleasain
lgleasain / gist:3307066
Created August 9, 2012 18:50
tropo callout
Net::HTTP.post_form(URI.parse('http://api.tropo.com/1.0/sessions'), "token" => token, "destination" => "14044754845", "tropo_tag" => 666, "caller_id" => '4048675309', "caller_id_name" => 'beavis')
@lgleasain
lgleasain / gist:3305573
Created August 9, 2012 16:15
tropo_agi.yml
# Configuration for connecting to your AGI Server
tropo:
# The default voice to use for Speech Synthesis/TTS
# Refer to: https://www.tropo.com/docs/scripting/say.htm (voice option) for a list of supported voices
voice: kate
# The default recognizer to use for Speech Recogintion/ASR
# Refer to: https://www.tropo.com/docs/scripting/ask.htm (recognizer option) for a list of supported recognizers
recognizer: en-us
# The SIP address to send the session/call to if AGItate may not connect to your AGI server
@lgleasain
lgleasain / gist:2173383
Created March 23, 2012 18:11
latest failure
01265 5da8 6:10:13 PM SimpleOutgoingCall[+14044754845/null->14049662820!sip.tropo.com/null]<-hangup(), _state=DISCONNECTED
01266 5da8 6:10:13 PM Call from +14044754845 to 14049662820!sip.tropo.com failed. com.voxeo.tropo.ErrorException: Outbound call has timed out. at com.voxeo.tropo.core.SimpleOutgoingCall.ring(SimpleOutgoingCall.java:145) at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.voxeo.tropo.sandbox.SandboxInvocationHandler.invoke(SandboxInvocationHandler.java:42) at $Proxy51.ring(Unknown Source) at com.voxeo.tropo.core.MultiCallCoordinator$MakeCall.run(MultiCallCoordinator.java:146)
01267 5da8 6:10:13 PM Unregistering call +14044754845 -> 14049662820!sip.tropo.com
01268 5da8 6:10:13 PM Stopping listener thread Tropo-Thread-0d89bcc862d5eab8655a13bc722eff80-MrcpHotWordListener@2910c073
01269 5da8 6: