Skip to content

Instantly share code, notes, and snippets.

View bostondv's full-sized avatar
🎩

Boston Dell-Vandenberg bostondv

🎩
View GitHub Profile
@bostondv
bostondv / github-custom-dark-mode.js
Created April 20, 2021 18:59
Github Custom Dark Mode Tampermonkey Script
// ==UserScript==
// @name Github Custom Dark Mode
// @namespace http://github.com
// @version 0.1
// @description A lighter version of Github's dark mode but not as light as the "dimmed" dark mode.
// @author Boston Dell-Vandenberg
// @match https://github.com/*
// @icon https://www.google.com/s2/favicons?domain=github.com
// @grant none
// ==/UserScript==
@bostondv
bostondv / sudoku-solver.ts
Last active February 14, 2019 02:53
Sudoku Solver
type IRow = number[]
type IBoard = IRow[]
const board: IBoard = [
[4, 5, 0, 8, 0, 0, 9, 0, 0],
[0, 9, 0, 0, 5, 6, 0, 0, 4],
[1, 0, 0, 0, 0, 0, 0, 0, 7],
[2, 6, 0, 5, 4, 0, 0, 9, 0],
[0, 0, 4, 1, 0, 2, 3, 0, 0],
[0, 7, 0, 0, 6, 9, 0, 4, 8],
@bostondv
bostondv / keybase.md
Created October 14, 2017 13:23
keybase.md

Keybase proof

I hereby claim:

  • I am bostondv on github.
  • I am bostondv (https://keybase.io/bostondv) on keybase.
  • I have a public key ASDnukNDioQD-R1I2jQtRf3QSpAAucRAo2T6VRtTpFeD9go

To claim this, I am signing this object:

@bostondv
bostondv / README.md
Last active October 25, 2016 17:41
WordPress Bedrock Setup for Webfaction
  1. Setup project repository using Bedrock

  2. Add bedrock-capistrano to project

  3. Configure config/deploy/*.rb files and add the following to each.

    set :deploy_to, '/home/USERNAME/webapps/SITENAME'
    set :tmp_dir, '/home/USERNAME/tmp'
    
<?php
/**
* Plugin Name: WP REST API CORS
* Description: Fixes to enable <a href="http://www.html5rocks.com/en/tutorials/cors/">CORS</a> for the <a href="https://github.com/WP-API/WP-API">WP REST API</a>.
* Author: Boston Dell-Vandenberg
* Author URI: http://pomelodesign.com
* Version: 1.0.0
* Plugin URI: https://github.com/thenbrent/WP-API-CORS
*/
cd $HOME
mkdir $HOME/bin
ln -s `which php70` $HOME/bin/php
echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
source $HOME/.bashrc
curl -sS https://getcomposer.org/installer | php
mv $HOME/composer.phar $HOME/bin/composer
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv $HOME/wp-cli.phar $HOME/bin/wp
@bostondv
bostondv / .htaccess
Last active August 29, 2015 14:03
.htaccess main domain to subdirectory redirect
# .htaccess main domain to subdirectory redirect
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /web/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ web/index.php [L]
@bostondv
bostondv / memory_usage.py
Created March 23, 2014 17:46
Webfaction memory usage script
#!/usr/local/bin/python2.5
import subprocess
import sys
import re
import os,pwd
from pprint import pprint
class TerminalController:
"""

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@bostondv
bostondv / virtual
Created September 7, 2013 13:48
VirtualDocumentRoot Apache Config
UseCanonicalName Off
DocumentRoot /path/to/www
VirtualDocumentRoot /path/to/www/%1
ServerName %1.local
CacheDisable /path/to/www/%1
<Directory /path/to/www/%1>
Options Indexes FollowSymLinks Multiviews +Includes
AllowOverride All
</Directory>