Skip to content

Instantly share code, notes, and snippets.

View distransient's full-sized avatar
🍜
Mmm noodles tasty

Kel distransient

🍜
Mmm noodles tasty
View GitHub Profile
@distransient
distransient / theme.html
Created October 9, 2013 05:16
tumblr theme
<html>
<head>
<title>human-analog</title>
<meta charset="utf-8">
<meta name="description" content="{block:IndexPage}{block:Description}{MetaDescription}{/block:Description}{/block:IndexPage}{block:PermalinkPage}{block:PostSummary}{PostSummary}{/block:PostSummary}{/block:PermalinkPage}" />
<meta name="color:Accent" content="#4EA3D0"/>
<meta name="font:Body" content="'Helvetica Neue', Helvetica, Arial, sans-serif"/>
<meta name="if:Two column posts" content="1"/>
MONGODB_URL = process.env.MONGODB_URL || 'mongodb://localhost/picalum'
mongoose.connect(MONGODB_URL, function(err) {
erlog.error(err, {
message: 'Upon attempting to connect to MongoDB server'
, success: 'Successfully connected to MongoDB server.'
})
})
@distransient
distransient / .vimrc
Last active December 26, 2015 19:59
vim config file
" vim's standard search mode is all wonky, make it normal like on browsers
set incsearch
" make indents into double spaces
filetype plugin indent on
set tabstop=2
set shiftwidth=2
" highlight syntax
syntax on
@distransient
distransient / main.css
Created November 17, 2013 02:38
attempt at browser reset
*, *:after, *:before {
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
@distransient
distransient / index.css
Created November 18, 2013 01:06
pseudo element for hexagon
header.hero h2:before {
content: " ";
display: block;
position: absolute;
top: 1em;
bottom: 1em;
left: 2em;
right: 2em;
background: transparent url('/web-resources/hexagon-outline.svg') no-repeat center center;
-webkit-background-size: contain;
var myfunc1 = function(callback) {
console.log('hello, world');
callback();
}
var myfunc2 = function() {
return 'hello, world';
}
myfunc1(myfunc2);
@distransient
distransient / server-unfolded.js
Last active December 28, 2015 17:39
http server example
var http.createServer = function() {
var callback = function(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
console.log('making server');
}
//do stuff here to spin up i/o, whatever
var response = 'response object stuff';
var request = 'request object stuff';
callback(response, request);
var erlog = require('erlog')
, express = require('express')
, config = require('./lib/web/config')
, routes = require('./lib/web/routes')
, jade = require('jade')
, app = express()
, server = app.listen(process.env.PORT || 3000, function(){
erlog('Listening on port 3000.')
})
@distransient
distransient / input.py
Created December 4, 2013 02:58
this is crap
def myFunc(arg = []):
arg.append('foobar')
print str(arg)
for item in range(10):
myFunc()
@distransient
distransient / output
Created December 4, 2013 09:18
Angel-engine *nix-prereqs.sh output
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
build-essential is already the newest version.
build-essential set to manually installed.
cmake is already the newest version.
libfreetype6-dev is already the newest version.
libfreetype6-dev set to manually installed.
libglu1-mesa-dev is already the newest version.