Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile
@adamloving
adamloving / Gruntfile.coffee
Created July 19, 2013 23:52
The best thing I added to my Gruntfile this week.
SUCCESS_PHRASES = ['all good', 'works for me', 'keep it coming', 'yeah baby', 'i like it',
'you\'re good', 'that\'s it', 'nailed it', 'mmm hmmm', 'sweet', 'keep it up', 'yep']
# ...
exec:
notify_ok:
cmd: ->
phrase = SUCCESS_PHRASES[Math.round(Math.random()*(SUCCESS_PHRASES.length-1))]
"say -v Vicki \"#{phrase}\""
@abby-fuller
abby-fuller / Vagrantfile
Created July 13, 2016 20:27
airtime backend vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
MEMORY = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 2
CPUS = `sysctl -n hw.ncpu`.to_i
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if ENV['VM'] == "virtualbox"
@GaryRogers
GaryRogers / VagrantCentOS.md
Last active February 8, 2020 20:32
Provisioning Vagrant CentOS hosts
@mhemmings
mhemmings / adminer.sh
Created January 30, 2014 22:52
Download Adminer like a boss! Found myself often wanting to quickly put Adminer on a box for a few minutes while I investigated something but couldn't remember the URL. This script downloads Adminer and also has some cool extra functionality, including automatic deletion (see --help for usage)
#!/bin/bash
usage() {
printf "%s\n" "Usage: $0 [-m] [-e] [-o] [-c] [-d]"
printf "\t%s\n\t%s\n\t%s\n\t%s\n" \
"-m MySQL only" "-e English only" "-o Output file" \
"-c CSS file to download" "-d Auto-delete time (minutes)"
exit 1
}
@michaelgold
michaelgold / SmartThings Insteon Hub
Last active January 1, 2022 11:51
SmartThings Insteon Hub Device Type
/**
* Insteon Switch (LOCAL)
*
* Copyright 2014 patrick@patrickstuart.com
* Updated 1/4/15 by goldmichael@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
PACKAGE=$(basename "$0")
# .----. _ .-. _ _
# `--. ::_;: :.-. :_;:_;
# ,','.-.: `'.' .--. .-..-.
# .'.'_ : :: . `.' '_.': :: :
# :____;:_;:_;:_;`.__.': ::_;
# .-. :
@olberger
olberger / Vagrantfile
Last active January 25, 2022 07:40
"Rapidly spinning up a VM with Ubuntu, Docker and Minikube (using the –vm-driver=none option) on my Windows laptop using Vagrant and Oracle VirtualBox" by Marc Lameriks - Source: https://technology.amis.nl/2019/02/12/rapidly-spinning-up-a-vm-with-ubuntu-docker-and-minikube-using-the-vm-drivernone-option-on-my-windows-laptop-using-vagrant-and-ora…
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.define "ubuntu_minikube" do |ubuntu_minikube|
config.vm.network "forwarded_port",
guest: 8001,
host: 8001,
auto_correct: true
@potto007
potto007 / add_ssl_to_cloudkey.txt
Last active April 14, 2022 23:06
Set up Free SSL with Ubiquiti UniFi Cloud Key -- follow instructions in `add_ssl_to_cloudkey.txt`
1) Login to Cloud Key
2) Cloud Key ssh: `curl https://get.acme.sh | sh`
3) Cloud Key ssh: `acme.sh --upgrade --auto-upgrade --accountemail "myemail@example.com"`
4) Cloud Key ssh: Add `cloudkey-renew-hook.sh` file to `/root/.acme.sh`
5) Create free CloudFlare account (if not already member)
6) Login to CloudFlare
7) On CloudFlare: Create a zone for a domain you own (can add a cheap domain with namecheap.com or any number of alternatives)
8) On CloudFlare: Create an A record for your Cloud Key; ie: unifi.CHANGE.ME, 192.168.1.10
9) On UniFi Controller: Go to Settings; Click "Controller"; Change "Controller Hostname/IP" to the name entered in step 8.
10) On CloudFlare: go to Overview for your zone; click "Get your API key"
@mburst
mburst / rss_reader.php
Created March 24, 2013 03:58
RSS Feed Reader in PHP
<html>
<head>
<title>RSS Feed Reader</title>
</head>
<body>
<?php
//Feed URLs
$feeds = array(
"http://maxburstein.com/rss",
"http://www.engadget.com/rss.xml",

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption