Skip to content

Instantly share code, notes, and snippets.

View BlakePetersen's full-sized avatar

Blake Petersen BlakePetersen

View GitHub Profile

Last Tested: April 14, 2020

Run each of the following lines, replacing example.com and codehere with your details:

now dns add example.com @ MX codehere 15
now dns add example.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add example.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add example.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add example.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
@BlakePetersen
BlakePetersen / page-progress.js
Last active October 21, 2018 13:53
Page progress indicator bar for fixed navigation elements
import throttle from 'lodash/throttle';
const ProgressBar = () => {
let _canvas,
_canvasHeight,
_canvasWidth,
_ctx,
_fillColor,
_raf,
_scrollDepth,
@BlakePetersen
BlakePetersen / Vagrantfile
Created January 8, 2015 22:27
HHVM/nginx Vagrant Bootstrap
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "hhvm-nginx-vagrant-bootstrap.sh"
config.vm.network :forwarded_port, host: 4567, guest: 80
config.vm.provider "virtualbox" do |v|
v.name = "HHVM/nginx Vagrant Instance"
v.customize ["modifyvm", :id, "--memory", "2048"]
end
@BlakePetersen
BlakePetersen / Vagrantfile
Last active August 29, 2015 14:12
Vagrant - Ubuntu 14.04/nginx/Forever/SailsJS
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network :forwarded_port, host: 4567, guest: 80
config.vm.provider "virtualbox" do |v|
v.name = "SailsJS Vagrant Instance"
v.customize ["modifyvm", :id, "--memory", "2048"]
end
@BlakePetersen
BlakePetersen / local.example.com
Created January 2, 2015 06:33
nginx Proxy Pass
server {
server_name local.example.com;
listen 80;
location / {
proxy_pass http://localhost:1234;
}
}
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your