Skip to content

Instantly share code, notes, and snippets.

View axpence's full-sized avatar

Alex Spencer axpence

View GitHub Profile
"+15802154669":{
StateMachineName:"EventStateMachine",
StateProperties:[
{
"stateName":"INITIAL_STATE",
"stateData":{
"messageBody":"Welcome to Friend! I'm here to make StartupGrind the best event ever.\n\nChoose an option below:\n\n1=Ask a question\n2=Check schedule\n3=Find attendee contact info by name\n4=Share my contact info with other attendees.\n",
"linkToFile":"https://s3-us-west-2.amazonaws.com/eventz-vcards/Friend_SG.vcf",
"expectedResponseType":"range",
"day":"1",
@axpence
axpence / reRoute.js
Created February 6, 2016 22:08
reRoute.js
{
"body": "test message",
"fromNumber": "+15037561043",
"toNumber": "+15802154669",
"image": "",
"numMedia": "0",
"allParams": "{path={}, querystring={AccountSid=ACdff8314110d3934d88963262be901fda, ApiVersion=2010-04-01, Body=1, From=+15037561043, FromCity=PORTLAND, FromCountry=US, FromState=OR, FromZip=97219, MessageSid=SMd10c117c1f4434d38ebeea7a9d041c16, NumMedia=0, NumSegments=1, SmsMessageSid=SMd10c117c1f4434d38ebeea7a9d041c16, SmsSid=SMd10c117c1f4434d38ebeea7a9d041c16, SmsStatus=received, To=+15802154669, ToCity=LAWTON, ToCountry=US, ToState=OK, ToZip=73505}, header={Accept=*/*, Cache-Control=max-age=259200, CloudFront-Forwarded-Proto=https, CloudFront-Is-Desktop-Viewer=true, CloudFront-Is-Mobile-Viewer=false, CloudFront-Is-SmartTV-Viewer=false, CloudFront-Is-Tablet-Viewer=false, CloudFront-Viewer-Country=US, Via=1.1 cbce93bae14c2990d9c172c1090b26cd.cloudfront.net (CloudFront), X-Amz-Cf-Id=dKEfRttORopDUBPpLa1iW4RXZd9qKitUNVuW1C2j-5pZRxfrL-TM8A==, X-Forwarded-For=52.90.170.100, 54.
@axpence
axpence / paindemo.xml
Last active January 29, 2016 07:15
PainDemo.xml
<?xml version="1.0" encoding="UTF-8"?>
<survey name="KneeReplacementStateMachine">
<node id="INITIAL_STATE" day="1" onEnterAction="SMS" expectedResponseType="range" body="(DAY 1) How was your pain level today? 1=No Pain, 3= Some pain, but not limiting any activity, 5=modest pain, controlled with aspirin/tylenol, 7=Severe Pain (stronger medication), 9= Extreme Pain (need help)">
<node id="LOW_PAIN" onEnterAction="SMS" expectedResponseType="range" preGuardTransitionValues="1,2,3,4,5" body="This is typical. Dont forget to take your 1000 steps today.">
<pointer id="GOTO_DAY_3" onEnterAction="SMS" preGuardTransitionValues="N,n" transitionToState="DAY_3"></pointer>
</node>
<node id="MODERATE_PAIN" onEnterAction="SMS" preGuardTransitionValues="6,7,8" expectedResponseType="trueFalse" body="I walked 1000 steps today. (T)rue or (F)alse">
<node id="DECREASE_WALKING" onEnterAction="SMS" expectedResponseType="range" preGuardTransitionValues="true,t" body="Please decrease the amount of walking">
<pointer
T.A.:
TODO NOW:
1-Lowell summary for christain & Matt.
2-Lowell follow up email
-solar stuff.
2b-demo of survey for Lowell
//Builds our survey software.
{
"actionModules" : ["uber","thumbtack","yelp","ourCustomAPI","openCV","imageMagik","MPAZAnalyticsLogger","remindersAPI","AddressValidator","RecipeAPI"],//require(),#import..
"IOModules" : ["twilio","wechat"],
"flowProperties" : {
"input" : {"inputModule":"twilio","humanAttributeName":"fromNumber"},
"output" : {"outputModule":"twilio","systemAttributeName":"toNumber"}
},
"curatedFlowSource" : "http://www.example.com/CuratedFlowSurvey.json" ,
"flowStateStorage" : "TABLE_NAME_IN_DYNAMO",
@axpence
axpence / gist:d2f4e1d8e0beb9951b09
Created December 25, 2015 19:08
Android Notes.txt
Very good android tutorial for iOS devs: https://www.objc.io/issues/11-android/android_101_for_ios_developers/
Activities and Intents:
Activities are like UIViewControllers.
Activities have return values (An image editing activity can return a modified version of an input image from the input intent, for example).
Intents create new Activities -- Intents start Activities
Intents contain 2 things-1)Data 2)Action
Starting Activities with Intents is somewhat similar to creating a new UIViewController with a custom init method.
Activities can also return results when finished (goodbye modal delegates!)
Intents need a context.
Stefan Lessor - Apple Developer Tools Evangalist
-The living room experience
-TV is always connected to high speed internet
-TV is shared by multiple people (user A at 9am, user B at 2pm...)
-Communal experience (one device -> many users at same time.)
-Always remember--attention (eyes) are looking at the TV, always, while their hands are touching the remote. This is very different from iOS where the hands and screen were in the same attention frame. Design for this constraint. This is what (implication: user must never look down at ). This constraint is key for TV and this is the reason we introduced paralax, etc.
64 bit dual core A8 chip is a step above what we've been targeting on iOS. use higher quality assets, etc. Think 60" flat panel. Extra GPU power increases the complexity of your game modeling. Remember: every appleTV ships with Cloud Kit, Metal, etc. Take this into account when developing.
TVOS binaries only run on AppleTV. (Only ship the ARM64 slice). Likewise for 3rd party frameworks.
#!/usr/bin/python3
import os
import signal
import subprocess
import time
import psutil
# The os.setsid() is passed in the argument preexec_fn so
#!/usr/bin/python3
import os
import signal
import subprocess
import time
import psutil
# The os.setsid() is passed in the argument preexec_fn so
import os
import signal
import subprocess
import time
import psutil
# The os.setsid() is passed in the argument preexec_fn so
# it's run after the fork() and before exec() to run the shell.