Skip to content

Instantly share code, notes, and snippets.

View colindensem's full-sized avatar
🏠
Working from home

Fynn.Codes colindensem

🏠
Working from home
View GitHub Profile
@nblumoe
nblumoe / angularjs_resource_tokenhandler.js
Created July 5, 2012 07:34
AngularJS service to send auth token with $resource requests
.factory('TokenHandler', function() {
var tokenHandler = {};
var token = "none";
tokenHandler.set = function( newToken ) {
token = newToken;
};
tokenHandler.get = function() {
return token;
@colindensem
colindensem / src>controller>mynewproject_books_controller.erl
Created September 22, 2011 22:02
ChicagoBoss Book example circa 0.6.2+. Assumes project name is "mynewproject"
%%Note plurality, singular is ok too, but view/book(s) must match.
%%URI for this would be /books/<action>
-module(mynewproject_books_controller, [Req]).
-compile(export_all).
list('GET', []) ->
Books = boss_db:find(book, []),
{ ok, [{books, Books}]}.
mysqlimport -uroot -p --use-threads=<procs> --fields-terminated-by="," --fields-optionally-enclosed-by='"' --lines-terminated-by="\n" <schema_name> /tmp/*.txt
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access: