Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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

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 / 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
/* 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(){};
(*
This script counts lines in C# and F# projects.
It is used to compare the "useful lines" in F# projects with those in C# projects.
Copied from Kit Eason's code at http://www.fssnip.net/h4
REQUIRES:
* FSharp.Charting for charts
via NuGet
#! /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()
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
@saga
saga / Scheduler.lua
Created September 7, 2012 03:34 — forked from Deco/coroutine_scheduler.lua
Lua Coroutine Scheduler
pcall(require,"socket")
Scheduler = setmetatable({}, {
__call = function(class)
return setmetatable({
threads = {},
}, class)
end
})
Scheduler.__index = Scheduler