Skip to content

Instantly share code, notes, and snippets.

@josephwegner
josephwegner / planscope.coffee
Created January 3, 2014 21:56
Planscope Hubot Hipchat Script
# Description:
# Planscope
#
# Set the environment variable HUBOT_HIPCHAT_API_KEY
# Set the environment variable HUBOT_PLANSCOPE_API_KEY
#
# Dependencies:
# None
#
# Configuration:
@josephwegner
josephwegner / sprint.md
Created January 3, 2014 13:27
Leer Sprint #1

Leer Sprint #1

Goals

Learning

  • Learn canvas drawing/updating/animating techniques
  • Understand successful scalable techniques for real-time multiplayer websockets

Building

  • Make a full screen black canvas that adjusts size to fit the window
//Or, if you don't want messy code every time, just define an instaInterval function
function instaInterval(f, t) {
return (function() {
f();
return setInterval(f, t);
});
}
//And now create executable intervals on the fly
var interval = instaInterval(function() {
array_1 = [1, 2, 3, 4, 5, 6]
array_2 = [7, 8, 9, 10]
array_3 = zip(array_1, array_2)
array_3 = //[[1,7],[2,8],[3, 9],[4,10]]
//OR
//[[1,7],[2,8],[3, 9],[4,10],[5,undefined],[6,undefined]]
//OR
//ERROR
@josephwegner
josephwegner / loginTest.php
Created November 2, 2013 13:38
Waltz Login Test Page
<?
session_start();
if(isset($_POST['password']) && isset($_POST['username'])) {
$_SESSION['logged_in'] = true;
}
?>
<html>
@josephwegner
josephwegner / duckfile.md
Last active December 27, 2015 03:29
Waltz Dokku Duckfile

I'm getting the following when I try to push to the dokku instance:

  Josephs-MacBook-Pro:cydoemus josephwegner$ git push waltz master
 Counting objects: 1125, done.
 Delta compression using up to 4 threads.
 Compressing objects: 100% (888/888), done.
 Writing objects: 100% (1125/1125), 1.35 MiB | 0 bytes/s, done.
 Total 1125 (delta 229), reused 850 (delta 114)
 -----> Building api ...

remote: 2013/10/31 20:52:24 dial unix /var/run/docker.sock: permission denied

@josephwegner
josephwegner / what.md
Created October 5, 2013 19:52
Designing DownJS

DownJS

is an easy to use repository for all of your frontend javascript. I wrote that description about a year ago. As I dug into the idea, I abandonded it. Whie my intentions were good at the time, my technical plan was bad. I was planning on loading all of those scripts separately into the page. While they would be on a CDN, loading a bunch of script files separately is a bad practice - the more HTTP requests your page makes, the slower it's going to be. The best practice is to minify and concatenate all of your javascript so they can be served in one request. To avoid supporting bad web development practices, I abandoned DownJS

Today, however, there are numerous tools that can very easily solve this problem. Not only are the technical requirements of DownJS now very possible, but there have been many great examples of The Right Way to do package management. Now is the time for DownJS to take off.

The Right Way

On the technical side, DownJS would do a simple concatenatio

GOGO PRIVACY POLICY

Last updated June 28, 2012

Gogo LLC and its subsidiaries, affiliates, web site developers and other promotional partners ("Gogo," "us" or "we") respect your concerns about privacy and value our relationship with you. This privacy policy (the "Privacy Policy") is intended to inform you of the types of information we collect, as well as our policies and practices regarding the collection, use, and disclosure of that information through the web pages, interactive features, mobile applications, blogs and their respective contents at the URLs www.gogoair.com, blog.gogoair.com and airborne.gogoinflight.com, in addition to our Twitter, Facebook or other social networking sites, and their respective contents (collectively, the "Sites"), and the Gogo services (collectively with the Sites, the "Services"), whether accessed via computer, mobile device or other technology.

Please read this Privacy Policy carefully, because by using the Services, you are acknowledging that you understand and agree

@josephwegner
josephwegner / simplepost.md
Last active December 23, 2015 05:39
Simple API Tutorial Post

APIs are commonly a pain to build - there's all kinds of moving pieces: routing, data parsing, serialization, database interactions, etc. For years I've struggled with writing web APIs in Node.js - there's just so much complexity required in an API boilerplate. That's why I wrote Simple API. Simple API is an incredibly simple module for writing web-based APIs in Node.js

I often hear people say that they've written a library that makes something "simple", but in reality they've just made it a different kind of complex. I'm going to prove that's not the case with Simple API. This tutorial is going to teach you to write an API for a ToDo list, where the entire project is less than 300 lines of code. That's the entire project - the API related files are less than 200 lines of code.

*The examples will all be written in CoffeeScript, bu

# Schedule Controller
PlanApp.controller "ScheduleCtrl", ($scope, api, $filter) ->
$scope.page = "schedule"
deals = []
stages = []
api.stages.getAll (err, data) ->
if err