Skip to content

Instantly share code, notes, and snippets.

View alnjxn's full-sized avatar

Alan Jackson alnjxn

View GitHub Profile
@tedder
tedder / docker-compose.yml
Last active July 26, 2021 15:01
helium validator + watchtower (with consensus check) + exporter
# launch: docker-compose up -d
version: "3.7"
services:
validator:
image: quay.io/team-helium/validator:latest-validator-amd64
container_name: validator
init: true
restart: always
ports:
- "2154:2154"
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
// paths and constants
var path = require('path')
var SRC_PATH = path.resolve('./src')
var DIST_PATH = path.resolve('./build')
var OUTPUT_FILENAME = '[name].[chunkhash].js'
var DEV_REGEXP = (/(^babel-?.*|.*-plugin$|.*-loader)/)
var DOT_ENV_SAMPLE_PATH = path.resolve('./.env.default')
var DOT_ENV_PATH = path.resolve('./.env')
var pkg = require('./package.json')
@devinivy
devinivy / server.js
Created January 20, 2016 03:34
Testing an initialized hapi server
var Hapi = require('hapi');
// Keep track of the server's init state
var internals = {
initialized: false
};
var server = new Hapi.Server();
server.connection();
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active July 27, 2024 16:49 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@ymjing
ymjing / Monaco for Powerline.md
Last active March 24, 2022 14:34
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active August 12, 2024 10:45
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@pascalpoitras
pascalpoitras / config.md
Last active October 7, 2024 01:35
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@mariocesar
mariocesar / runserver.py
Created October 23, 2012 11:18
Runs the django dev server along with ´compass watch´ command. For fun and profit
import os
import subprocess
import atexit
import signal
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.management.commands.runserver import Command as RunserverCommand
@vitobotta
vitobotta / Importing posts from Wordpress into Jekyll.rb
Created March 26, 2011 22:50
The script I used to import posts from my Wordpress blog into a new Jekyll one.
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g}
require File.join(File.dirname(__FILE__), "downmark_it")
module WordPress
def self.import(database, user, password, table_prefix = "wp", host = 'localhost')
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8')
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder}