Skip to content

Instantly share code, notes, and snippets.

View JacobDB's full-sized avatar

Jacob Bearce JacobDB

View GitHub Profile
# Apache Server Configs v2.14.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html.
# ######################################################################
@JacobDB
JacobDB / config.php
Last active April 24, 2017 13:43
Example settings for triggering a gulp task when using https://github.com/vicenteguerra/git-deploy
<?php
define('TOKEN', 'some-secret-token');
define('REMOTE_REPOSITORY', 'git@github.com:username/repository.git');
define('DIR','/var/www/repository/');
define('BRANCH','refs/heads/master');
define('LOGFILE', 'log.txt');
define('GIT', '/usr/bin/git');
define('AFTER_PULL', '/usr/bin/node ./node_modules/gulp/bin/gulp.js default --dist');
@JacobDB
JacobDB / install.sh
Created April 26, 2017 22:45
Install Jekyll on WSL
sudo apt-get install ruby ruby-dev gcc
sudo gem install jekyll bundler
@JacobDB
JacobDB / navigation.html
Created April 30, 2017 14:56 — forked from danblakemore/navigation.html
Nested Jekyll page navigation without plugins
{% capture html %}
{% assign childCount = '' %}
{% comment %} Make sure there will be pages before making the ul tag. {% endcomment %}
{% assign entries = site.pages | sort: "path" %}
{% for entry in entries %}
{% capture slug %}{{ entry.url | split: "/" | last }}{% endcapture %}
{% capture current %}{{ entry.url | remove: slug | remove: "//" | append: "/" }}{% endcapture %}
{% if current == include.context %}
@JacobDB
JacobDB / alt-arrow-home-end.ahk
Last active June 17, 2017 21:39
Remap !→ to "End" and !← to "Home" to make switching between Mac & Windows easier
!Left::
Send, {Home}
Return
!Right::
Send, {End}
Return
@JacobDB
JacobDB / fix-web-permissions.sh
Last active June 23, 2017 16:11
Small script to fix web permissions
#!/bin/bash
directory=$1
if [ "$directory" == "" ]
then
echo -e $"${0##*/}: missing operand"
exit 1;
fi;
if ! [[ -r "$directory" && -w "$directory" ]]
// config/db.js
module.exports = {
url : 'mongodb://localhost/acquisition'
}
@JacobDB
JacobDB / ftp.json
Last active October 2, 2017 14:45
ftp.json for use with my new-site and new-site-static repositories.
{
"dev": {
"host": "",
"user": "",
"pass": "",
"path": ""
},
"dist": {
"host": "",
"user": "",
@JacobDB
JacobDB / .nvmrc
Created March 26, 2018 21:41
Configuration file to use Node LTS with NVM
lts/*
@JacobDB
JacobDB / config.js
Last active April 14, 2018 22:20
Why does this task not work when I put everything directly in a promise?
// JavaScript Document
// Scripts written by __gulp_init__author_name @ __gulp_init__author_company
module.exports = {
// config task, generate configuration file for uploads & BrowserSync and prompt dev for input
config(gulp, plugins, requested = "") {
// generate config.json and start other functions
const generate_config = (file_name, mode = "ftp") => {
// store array of config file URIs