Skip to content

Instantly share code, notes, and snippets.

View cfjedimaster's full-sized avatar
😺
Happy, and tired.

Raymond Camden cfjedimaster

😺
Happy, and tired.
View GitHub Profile
@cfjedimaster
cfjedimaster / app.js
Created August 27, 2015 18:50
POC for generating dynamic paths for HarpJS
/*
The name of the file could be app.js, which could be a requirement. Maybe there could be multiple things it does besides just virtual paths and stuff.
*/
//public is a copy of the Harp global data, basically everything you normally get access to
function generatePaths(public) {
//result must be an array
var result = [];
//lets make categories, pretend public.categories is an array of labels
/* global angular */
angular.module('noteDbFilters', []).filter('dateFormat', function() {
return function(input) {
if(!input) return "";
input = new Date(input);
var res = (input.getMonth()+1) + "/" + input.getDate() + "/" + input.getFullYear() + " ";
var hour = input.getHours();
var ampm = "AM";
if(hour === 12) ampm = "PM";
//url was defined earlier with my desired method call, args, etc
var ts = new Date().getTime();
var hash = crypto.createHash('md5').update(ts + PRIV_KEY + API_KEY).digest('hex');
url += "&ts="+ts+"&hash="+hash;
<cfset a = []>
<cfloop index="x" from="1" to="99">
<cfset s = {}>
<cfset s.name = createUUID()>
<cfset s.buffer = repeatString("x", 900)>
<cfset arrayAppend(a, s)>
</cfloop>
<cfset then = getTickCount()>
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, brackets, $, window, Mustache */
define(function (require, exports, module) {
'use strict';
var
mainHtml = require("text!templates/display.html");
var Commands = brackets.getModule("command/Commands"),
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*! Parker v0.0.0 - MIT license */
'use strict';
function CssDeclaration(raw) {
this.raw = raw;
}
/* global $,console,document,behanceAPI */
var behancekey = "REPLACE ME";
$(document).ready(function() {
//Set my key
behanceAPI.setKey(behancekey);
behanceAPI.getProjectsForUser("gwilson", function(res) {
console.dir(res);
<style>
.header2 #myHead {
display: block;
left: 10px;
top: 20px;
}
.header2 #myHead:after {
content: "The headline";
}
<style>
.header2 #myHead {
display: block;
position: absolute;
left: 10px;
top: 20px;
}
.header2 #myHead:after {
content: "The headline";
//first, put all the divs up ehre
var $theDiv = $("#somediv");
//ie, the second, third, etc
$("input[name=TypeofRequest]").on("change", function(e) {
console.log('changed');
var valPicked = $(this).val();
//hide on D
if(valPicked == "GraphicMaterials") {
$theDiv.show();