Skip to content

Instantly share code, notes, and snippets.

Jacob Bearce JacobDB

Block or report user

Report or block JacobDB

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JacobDB
JacobDB / ftp.json
Last active Oct 2, 2017
ftp.json for use with my new-site and new-site-static repositories.
View ftp.json
{
"dev": {
"host": "",
"user": "",
"pass": "",
"path": ""
},
"dist": {
"host": "",
"user": "",
@JacobDB
JacobDB / wkqx.php
Created Mar 15, 2016
Web scraper to convert TuneGenie in to RSS
View wkqx.php
<?php
$url = "http://wkqx.tunegenie.com/";
$title = "WKQX RSS Feed";
$description = "A constantly updated feed for WKQX's playlist";
$userAgent = "Googlebot/2.1 (http://www.googlebot.com/bot.html)";
header("Content-type: text/xml; charset=utf-8", true);
echo "<?xml version='1.0' encoding='UTF-8' ?>" . PHP_EOL;
echo "<rss version='2.0'>" . PHP_EOL;
View break-a-skypebot.js
// config/db.js
module.exports = {
url : 'mongodb://localhost/acquisition'
}
View update-invoice-ninja.sh
#!/bin/bash -ue
#Invoice Ninja Self-Hosted Update
#PLEASE SEE THE README AT https://pastebin.com/nwcSH0TH
#SET INVOICE NINJA INSTALL AND STORAGE PATHS
#--------------------------------------------------------
sudo updatedb
ninja_home="$(locate -b '\composer.json' | xargs grep -l "invoiceninja/invoiceninja" | xargs -n 1 dirname)"
ninja_storage="$ninja_home/storage"
View .htaccess
# 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 / .gitlab-ci.yml
Last active Nov 13, 2017 — forked from RafalSladek/ .gitlab-ci.yml
gitlab ci file for gulp build pipeline with the latest nodejs
View .gitlab-ci.yml
image: node:latest
cache:
paths:
- node_modules/
before_script:
- npm install -g gulp
- npm install
View inline-svg-function.scss
// Replace letters
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@JacobDB
JacobDB / atom.sh
Last active Feb 13, 2019
Alias used to open Atom from within Bash on WSL.
View atom.sh
atom() {
target_path=$(wslpath -a -w $(readlink -f $1)) # resolve the path
(/mnt/c/Windows/System32/cmd.exe /C "atom.cmd $target_path" &> /dev/null) # open the path
}
@JacobDB
JacobDB / open.sh
Last active Sep 27, 2018
Alias used to open File Explorer from within Bash on WSL.
View open.sh
open() {
target_path=$(wslpath -a -w $(readlink -f $1)) # resolve the path
/mnt/c/Windows/explorer.exe $target_path # open the path
}
@JacobDB
JacobDB / config.php
Last active Apr 24, 2017
Example settings for triggering a gulp task when using https://github.com/vicenteguerra/git-deploy
View config.php
<?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');
You can’t perform that action at this time.