Skip to content

Instantly share code, notes, and snippets.

Avatar

Simeon Vincent dotproto

View GitHub Profile
View introducing_gloggy.md

Introducing Gloggy

Gloggy is a super simple (albiet terribly named) blogging system that runs on top of GitHub's Pages and Gists features.

@dotproto
dotproto / gloggy_fork.md
Last active Aug 29, 2015 — forked from dotproto/introducing_gloggy.md
POST: This is a test of a multi-line gist description. This is totally a hack. I'm sorry GitHub.
View gloggy_fork.md

Introducing Gloggy

Gloggy is a super simple (albiet terribly named) blogging system that runs on top of GitHub's Pages and Gists features.

View app.js
var express = require('express');
var app = express();
// Load routes
require('./src/routes')(app);
@dotproto
dotproto / include.js
Last active Aug 29, 2015
Module-root relative file includes for Node.js
View include.js
var fs = require('fs');
var path = require('path');
var parentModulePath = path.dirname(module.parent.filename);
// Recursively traverse up a given path tree checking for a file's existence.
function rstat(dir, filename, endPath) {
// End the search at endPath if provided, otherwise default to root
endPath = endPath || path.resolve('/');
var target = path.join(dir, filename);
@dotproto
dotproto / block-1.js
Created Jul 28, 2014
This is only a test
View block-1.js
(function() {
console.log("You're the best around");
console.log("Nothing's ever gonna keep you down");
})()
@dotproto
dotproto / apply.js
Last active Aug 29, 2015
Function application as a service
View apply.js
function buildApply() {
var args = Array.prototype.slice.call(arguments, 0);
var fn = args.shift();
// proxy function
return function bindProxy() {
var proxyArgs = Array.prototype.slice.call(arguments, 0);
return fn.apply(null, args.concat(proxyArgs));
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am svincent on github.
  • I am simeon (https://keybase.io/simeon) on keybase.
  • I have a public key whose fingerprint is 9C9B 5CCA 4B4A A1EE 69E3 2BCF 0CE9 6BFE 064E 3BFC

To claim this, I am signing this object:

@dotproto
dotproto / example.js
Last active Aug 29, 2015
Retrieve a list of custom for your Angular module
View example.js
var deps = require('./getModuleDeps');
console.table(deps('myModule'));
/* Example output (ASCII-fied)
--------------------------------------------------------------
| (index) | provider | type | name |
|---------|--------------------|-------------|---------------|
| 0 | "$compileProvider" | "directive" | "myDirective" |
@dotproto
dotproto / List.js
Last active Aug 29, 2015
An extension of Array with some additional helper methods I wanted.
View List.js
function List () {}
List.prototype = []
List.prototype.constructor = List
List.prototype._return = function _return (val) {
if (val.length <= 1)
val = val[0]
return val
}
@dotproto
dotproto / index.html
Created Sep 10, 2015
Content editable example
View index.html
<html>
<head>
<style>
/* We're using floats to prevent spaces from appearing between
* the elements that make up the URL. Alternatives include flex,
* or simply removing the spaces form the HTML. See this link
* for more information:
* https://css-tricks.com/fighting-the-space-between-inline-block-elements/
*/
.url-wrap span {
You can’t perform that action at this time.