This file contains hidden or 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 hidden or 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' => '[email protected]', '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 hidden or 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 hidden or 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 hidden or 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 hidden or 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}]); | |
} | |
}); |
This file contains hidden or 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
# upload /Users/mehdi/Documents/attila ssh://[email protected]:443/analytics | |
# git | |
Warning: Permanently added '[uploader.dotcloud.com]:443,[23.21.128.228]:443' (RSA) to the list of known hosts. | |
Everything up-to-date | |
17:13:58 ---> Deploy of "analytics" scheduled for revision git-574d320 at 2013-09-27 17:13:58 | |
17:13:58 ---> Building the application... | |
17:13:58 [extract] Build started for revision git-574d320-1 (clean build) | |
17:14:01 [extract] I am snapshotsworker_02/ec2-184-73-114-244, and I will be your builder today. | |
17:14:03 [extract] stdin: is not a tty | |
17:14:03 [extract] Get:1 http://us-east-1.ec2.archive.ubuntu.com.s3.amazonaws.com lucid Release.gpg [189B] |
This file contains hidden or 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
var connectButton = PT.dom.$("connect-button"); | |
PT.widget.connect.attachConnect(connectButton); | |
This file contains hidden or 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
window.ptReady = window.ptReady || []; | |
window.ptReady.push(function(){ | |
PT.event.bind('user.connected', function(event){ | |
console.log(event.accessToken);//<- this is the token you need to call our API | |
}); | |
}); |
This file contains hidden or 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
<div id="rwd_tab" class="left bottom"> | |
<div id="red_tab"></div> | |
<a id="pwd_below_tab" target="_blank" href="//www.punchtab.com?src=pwd-by-tab&src_key="> | |
</a> | |
</div> |