Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python
import sys
import json
import subprocess
import urllib
try:
import requests
except:
print "Install requests (try easy_install requests)"
sys.exit()
/* Simple JavaScript Inheritance with NFE's
* MIT Licensed.
*/
// Inspired by base2 and Prototype and John Resig's class system
(function(){
var initializing = false;
// The base Class implementation (does nothing)
this.Class = function(){};
@saga
saga / AngularJS-Windows-Authentication.authentication.js
Last active August 29, 2015 14:27 — forked from definitelynotsoftware/AngularJS-Windows-Authentication.authentication.js
AngularJS Windows Authentication Service using .NET Web API and Hot Towel template
angular.module('app')
.factory("authentication", ["$http", "$q", "$window", authentication]);
function authentication($http, $q, $window) {
var user;
function login() {
// check if the user already exists for this session
@saga
saga / nodeconf_2011.md
Created April 5, 2012 15:49 — forked from guybrush/nodeconf_2011.md
a list of slides from nodeconf 2011
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using System;
using System.Net;
using System.Net.Security;
namespace NetVCR.Specs
{
[TestClass]
public class Verify_basic_proxy_functionality
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@saga
saga / adams-heroku-values.md
Created January 19, 2016 08:06 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@saga
saga / gitconfig-git
Created February 19, 2016 06:28 — forked from stevenh512/gitconfig-git
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"
@saga
saga / index.js
Created February 26, 2016 08:03 — forked from max-mapper/index.js
requirebin sketch
var graph = require('ngraph.generators').noLinks(142);
graph.forEachNode(assignNiceColor);
var clickMe = document.createElement('h1')
clickMe.setAttribute('style', 'font-family: Helvetica, Arial; font-weight: 200; text-align: center; margin-top: 150px;')
clickMe.innerHTML = 'CLICK ME'
document.body.appendChild(clickMe)
var svg = require('ngraph.vivasvg')(graph);
svg.nodeTemplate("<circle r='5' fill='{{node.color}}'></circle>");
@saga
saga / useshapeways.py
Created March 25, 2016 17:33 — forked from sbaer/useshapeways.py
shapeways sample
"""Sample script that accesses the shapeways API
http://www.shapeways.com/api
"""
import wsdlprovider
wsdl_url = "http://api.shapeways.com/v1/wsdl.php"
username = "username"
password = "password"
application_id = "rhinotest"