Skip to content

Instantly share code, notes, and snippets.

@d4goxn
d4goxn / newscoop.yml
Created October 23, 2016 21:10
Newscoop Ansible config
---
- hosts: application
vars:
domain: rumman.co
deploy_key_file: ~/.ssh/gitlab-deploy
www_dir: /var/www/{{ domain }}/newscoop
virtualhost_conf: "/etc/apache2/sites-available/{{ domain }}.conf"
apache_log_dir: /var/log/{{ domain }}
apache_remove_default_vhost: true
@d4goxn
d4goxn / sillysubstitiutions.js
Last active May 11, 2016 15:12
xkcd 1679: If we can't have accurate news, then let's at least have fun news
(function() {
var replacements = {
"random": "broken",
"gaffe": "haunted",
"star[- ]studded": "blood-soaked",
"remains to be seen": "will never be known",
"silver bullet": "way to kill werewolves",
"subway system": "tunnels I found",
"surprising": "surprising to everyone except me",
"war of words": "interplanetary war",
@d4goxn
d4goxn / s-function.json
Created May 9, 2016 15:58
Serverless CloudFormation config for Elasticache Redis server
{
"name": "showConfig",
"runtime": "nodejs",
"description": "Returns Redis host and Serverless stage",
"handler": "redis/showConfig/handler.handler",
"timeout": 6,
"memorySize": 256,
"custom": {
"optimize": true
},
@d4goxn
d4goxn / index.html
Last active June 12, 2017 03:16
Webpack MD5 hashed split builds and HTML templating, with stable vendor bundle hash
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="app-root"></div>
{{scripts}}
</body>
@d4goxn
d4goxn / gulpfile.js
Created March 6, 2015 13:04
Gulp build attempt for React app with happily-ever-after caching
'use strict';
var fs = require( 'fs' );
var path = require( 'path' )
var gulp = require( 'gulp' );
var browserify = require( 'browserify' );
var source = require( 'vinyl-source-stream' );
var buffer = require( 'gulp-buffer' );
var rev = require( 'gulp-rev' );
var handlebars = require( 'gulp-compile-handlebars' );
render: function () {
console.log(this.state);
function renderArticleExcerpt(article) {
return ( < ArticleExcerpt key = {
article._id
} {...article
}
/>
);
var express = require( 'express' );
app = express();
app.get( '/', function( req, res ) {
console.log( 'app: index' );
res.send( 200 );
});
subApp = express();
@d4goxn
d4goxn / dmesg.txt
Created January 25, 2013 08:53
dmesg output for minetest crash.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.5.0-22-generic (buildd@komainu) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #34-Ubuntu SMP Tue Jan 8 21:47:00 UTC 2013 (Ubuntu 3.5.0-22.34-generic 3.5.7.2)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.5.0-22-generic root=/dev/mapper/xubuntu-root ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
This file has been truncated, but you can view the full file.
-------------
Separator
-------------
23:55:04: INFO[main]: logfile = debug.txt
23:55:04: INFO[main]: path_share = /home/dan/Projects/Following/minetest/bin/..
23:55:04: INFO[main]: path_user = /home/dan/Projects/Following/minetest/bin/..
23:55:04: INFO[main]: minetest with SER_FMT_VER_HIGHEST=25, VER=0.4.4-d1 BUILD_TYPE=Release RUN_IN_PLACE=1 USE_GETTEXT=0 USE_SOUND=1 STATIC_SHAREDIR=.