Skip to content

Instantly share code, notes, and snippets.

View p5150j's full-sized avatar
🎯
Focusing

Patrick p5150j

🎯
Focusing
View GitHub Profile
var chart = new Chartist.Line('.ct-chart', {
labels: ['1/1/2015', '1/2/2015', '1/3/2015', '1/4/2015', '1/5/2015', '1/6/2015', '1/7/2015'],
series: [
{
name: 'Comcast Views',
data: [151, 120, 165, 210, 199, 185, 160],
className: "myclass1"
},
{
name: 'Comcast Clicks',
//Terry, Scott, and any team members HI!
// Make sure you have node installed
// ..and then npm install redis --save
// save this js file in the same dir you npm install redis
//make sure redis is running
//now run node JobEJob.js
app.post('/authenticate', function (req, res) {
//TODO validate req.body.username and req.body.password
//if is invalid, return 401
if (!(req.body.username === 'john.doe' && req.body.password === 'foobar')) {
res.send(401, 'Wrong user or password');
return;
}
var profile = {
first_name: 'John',
@p5150j
p5150j / auth
Created November 5, 2014 18:25
var xhr = new XMLHttpRequest();
xhr.open("POST", "https://api.parse.com/1/classes/Message", true);
xhr.setRequestHeader("X-Parse-Application-Id", "your application id");
xhr.setRequestHeader("X-Parse-REST-API-Key", "your REST API key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var result = JSON.parse(xhr.responseText);
if (result.objectId) {
@p5150j
p5150j / jdubz.js
Last active August 29, 2015 14:06
"undefined" == typeof jwplayer && (jwplayer = function (h) {
if (jwplayer.api) return jwplayer.api.selectPlayer(h)
}, jwplayer.version = "6.10.4906", jwplayer.vid = document.createElement("video"), jwplayer.audio = document.createElement("audio"), jwplayer.source = document.createElement("source"), function (h) {
function c(f) {
return function () {
return a(f)
}
}
function l(f, a, k, m, d) {
Format profile : Base Media / Version 2
Codec ID : mp42
Format profile : [email protected]
Format settings, GOP : M=2, N=100
+ Format profile : Base Media
- Format profile : Base Media / Version 2
+ Codec ID : isom
- Codec ID : mp42
- Format profile : [email protected]
- Format settings : 1 Ref Frames
render : function()
{
app.enableQE();
var active_seq = qe.project.getActiveSequence();
if (active_seq != null)
{
// Define a couple of callback functions, for AME to use during render.
openProject : function()
{
var proj_to_open = File.openDialog ("Choose project:", null, false);
if (proj_to_open != null && proj_to_open.exists)
{
app.openDocument(proj_to_open.fsName);
proj_to_open.close();
}
function getStorage(type) {
var storage = window[type + 'Storage'],
delta = 0,
li = document.createElement('li');
if (!window[type + 'Storage']) return;
if (storage.getItem('value')) {
delta = ((new Date()).getTime() - (new Date()).setTime(storage.getItem('timestamp'))) / 1000;