Skip to content

Instantly share code, notes, and snippets.

const graphviz = require("graphviz");
const defaultOptions = {
G: {
overlap: false,
pad: 0.3,
rankdir: "LR",
layout: "dot",
bgcolor: "#111111",
},
@saintedlama
saintedlama / index.html
Created September 4, 2021 06:13
Minimal responsive html boilerplate
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minimal responsive boilerplate</title>
</head>
<body>
</body>
@saintedlama
saintedlama / db.js
Created February 21, 2018 13:56
Using exposed prototypes in mongoist
const mongoist = require('mongoist');
module.exports = mongoist('test');
module.exports.Database = mongoist.Database;
module.exports.Collection = mongoist.Collection;
module.exports.Cursor = mongoist.Cursor;
module.exports.Bulk = mongoist.Bulk;
@saintedlama
saintedlama / promise.js
Created February 22, 2017 08:47
Promise catch/then
new Promise((resolve, reject) => reject('does not work'))
.catch(e => { console.log('caught first', e); return 1; })
.then(val => console.log('first then', val))
.then(val => console.log('second then', val))
.catch(e => console.log('caught end', e));
@saintedlama
saintedlama / project.json
Created January 10, 2017 09:00
Fix AspNetCore Web Client imports
{
"frameworks": {
"imports" : ["dnxcore50", "portable-net45+netcore45+wp8+wp81+wpa81"]
}
}
@saintedlama
saintedlama / nes.gpl
Created December 18, 2016 16:31
NES Color Palette - Gimp Palette
GIMP Palette
Name: NES Color Palette
Columns: 16
#
124 124 124 nes00
0 0 252 nes01
0 0 188 nes02
68 40 188 nes03
148 0 132 nes04
168 0 32 nes05
@saintedlama
saintedlama / index.html
Created October 27, 2016 19:50
Empty web placeholder
<html>
<head>
<title>Kirschlimona.de</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A web app intentionally left blank">
<meta name="author" content="Empty web placeholder gist">
<style>

Keybase proof

I hereby claim:

  • I am saintedlama on github.
  • I am saintedlama (https://keybase.io/saintedlama) on keybase.
  • I have a public key whose fingerprint is 8666 C435 472C 7CD2 A53B 4125 7A57 FAF1 1A31 BE87

To claim this, I am signing this object:

@saintedlama
saintedlama / npm-update-global.js
Last active December 1, 2015 16:58
Update all global node.js modules
require('shelljs/global');
var execOutdated = exec('npm outdated -g --depth=0 --json');
if (execOutdated.code != 0) {
console.log(execOutdated.output);
process.exit(1);
}
if (execOutdated.output == '') {
console.log('Everything is up to date! Awesome!');
@saintedlama
saintedlama / build.js
Created October 7, 2015 06:14
Build example with metalsmith
'use strict';
const Metalsmith = require('metalsmith');
const markdown = require('metalsmith-markdown');
const layouts = require('metalsmith-layouts');
const render = require('metalsmith-in-place');
const collections = require('metalsmith-collections');
const permalinks = require('metalsmith-permalinks');
const branch = require('metalsmith-branch');
const shell = require('shelljs');