This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window._mfq = window._mfq || []; | |
(function() { | |
var mf = document.createElement("script"); | |
mf.type = "text/javascript"; mf.async = true; | |
mf.src = "//cdn.mouseflow.com/projects/08ab6895-b885-4e9e-a827-5a8ece208524.js"; | |
document.getElementsByTagName("head")[0].appendChild(mf); | |
})(); | |
</script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" more routes before, but does not affect the use case """ | |
def follow_up_with_callee(twilio_data,event_id): | |
text = twilio_data.get('Body').upper() | |
task = import_module('switchboard.tasks') | |
if text == 'remove'.upper(): | |
content = 'Great. will let him know.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<div> | |
Something special in my about page with a <button id="aboutbutton">about button</button>. | |
Something less special with some <button>other button</button> which is the same as the home.html button. | |
</div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build a command line tool which takes a CSV file-like input, and creates an histogram in ASCII | |
data = [(0,1), | |
(2, 4), | |
(4, 2), | |
(3, 3)] | |
Each row in the CSV is data which helps build the histogram. The first value is the column #, the second value is the value of bar in the histogram. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<script> | |
var _pt_pre_config = { | |
auth_request: "eyJpZCI6IjIiLCJmaXJzdF9uYW1lIjoiSm9obiIsImxhc3RfbmFtZSI6IkRvZSIsImVtYWlsIjoiam9obi5kb2VAZXhhbXBsZS5uZXQiLCJhdmF0YXJfbGluayI6Imh0dHA6XC9cL3MzLmFtYXpvbmF3cy5jb21cL3B1bmNodGFiLXN0YXRpY1wvenp6enp6XC9pbWdcL3RlYW1cL2xld29sZi5qcGcifQ==", | |
signature: "9660b0ea6c6abc916ea055a6fdd12c76cb3a4dfb", | |
timestamp: "1389384230", | |
client_id: "2128281015" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define ('PUNCHTAB_CLIENT_ID', '2128281015'); //client_id | |
define ('PUNCHTAB_SECRET_KEY', '< YOUR SECRET KEY >'); | |
define ('PUNCHTAB_ACCESS_KEY', 'c370b56450e41a8f689fffb2374e7ef4'); //key | |
$user = array('id' => '2', 'first_name' => 'John', 'last_name' => 'Doe', 'email' => 'john.doe@example.net', 'avatar_link' => 'http://s3.amazonaws.com/punchtab-static/zzzzzz/img/team/lewolf.jpg'); | |
$auth_request = base64_encode(json_encode($user)); | |
$timestamp=time(); | |
$signature = hash_hmac('sha1', "$auth_request $timestamp", PUNCHTAB_SECRET_KEY); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import base64 | |
import hashlib | |
import hmac | |
import simplejson | |
import time | |
PUNCHTAB_CLIENT_ID = '2128281015' #client_id | |
PUNCHTAB_SECRET_KEY = '<YOUR SECRET KEY>' | |
PUNCHTAB_ACCESS_KEY = 'c370b56450e41a8f689fffb2374e7ef4' #key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$curl "https://api.punchtab.com/v1/auth/status?token=ll&key=c370b56450e41a8f689fffb2374e7ef4" | |
{ | |
"status": "disconnected" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//getting the punchtab db to do the real db operations.. | |
var punchtabDb = db.getSiblingDB('punchtab'); | |
//the date to start from | |
var oldestDoc = punchtabDb.track.find({},{date_created:1}).sort({date_created : 1}).limit(1).toArray()[0]; | |
var someOldDate = oldestDoc['date_created']; | |
var sleepAmount = 10 * 1000; //ten second | |
var failSafeDate = new Date(2013,05,13); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PT.event.bind('main.comment', function (response) { | |
if (response && response.commentID) { | |
_ptq.push(['review', {points: 100, ref_id: response.commentID}]); | |
} | |
}); |
NewerOlder