Skip to content

Instantly share code, notes, and snippets.

dweldon /
Last active Apr 8, 2022
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
dweldon /
Last active Jun 1, 2022
Add a local pg user who can login without a password

Install pg

sudo apt-get install postgresql postgresql-contrib

Login as postgres and create the new user (dave in this example)

sudo -i -u postgres
createuser dave
dweldon /
Created Feb 12, 2017
Add vue-play to a vue-cli webpack project


Here are the steps I used to add vue-play to my vue-cli webpack project. These instructions assume a directory structure like this:

├── build
└── src
 ├── components
dweldon / filepicker.js
Created Oct 1, 2014
View filepicker.js
var retry = new Retry({
baseTimeout: 100,
maxTimeout: 2000
var retryCount = 0;
var load = function() {
url: '//',
dweldon / leaderboard.js
Last active Aug 29, 2015
Leaderboard with ip-based vote restriction.
View leaderboard.js
Players = new Meteor.Collection("players");
IPs = new Meteor.Collection('ips');
if (Meteor.isClient) {
Template.leaderboard.players = function () {
return Players.find({}, {sort: {score: -1, name: 1}});
Template.leaderboard.selected_name = function () {
var player = Players.findOne(Session.get("selected_player"));
dweldon / meteor-nginx
Last active Nov 26, 2021
This is an example of how to configure nginx to serve a meteor app.
View meteor-nginx
server {
listen [::]:80;
listen 80;
return 301 https://$server_name$request_uri;
server {
dweldon / Cakefile
Last active Dec 11, 2015
This is a Cakefile for automatically compiling jade templates to html files in an arbitrarily deep directory tree. It was intended for use with meteor, however you can use it with any framework by changing the start task and the DIR. NOTE: this requires that chokidar and jade be installed via npm. NOTE: this assumes that the only html files unde…
View Cakefile
fs = require 'fs'
path = require 'path'
chokidar = require 'chokidar'
{spawn} = require 'child_process'
DIR = path.join __dirname, 'client'
isType = (file, type) ->
path.extname(file) is '.' + type