Skip to content

Instantly share code, notes, and snippets.

View JacobDB's full-sized avatar

Jacob Bearce JacobDB

View GitHub Profile
nativefier --name "Android Messages" --tray --single-instance --icon icon.png "https://messages.android.com"
#!/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"
@JacobDB
JacobDB / getftpjson.sh
Created September 19, 2018 16:06
Simple script to quickly get my ftp.json for older sites; place in /usr/local/bin
#!/bin/bash
curl -LOk https://gist.githubusercontent.com/JacobDB/a04f5ba7e00b267e71e2/raw/254fa0ae3545106f038af28d7d8ab30a440b2c0e/ftp.json
@JacobDB
JacobDB / wp-login.scss
Created September 24, 2018 15:35
Default login styles for WordPress along with color functions to easily change the theme
$base: #0085BA;
$tint: lighten(desaturate(adjust-hue($base, 1.6532), 27.2727), 6.6667);
$shade: darken(adjust-hue($base, 2.5111), 6.4706);
input:focus {
border-color: #5b9dd9; // @NOTE lighten(desaturate(adjust-hue($base, 11.4747), 37.6238), 23.9216)
box-shadow: 0 0 2px rgba(30,140,190,.8); // @NOTE transparentize($tint, 0.2)
}
input[type="checkbox"]:checked::before {
@JacobDB
JacobDB / open.sh
Last active September 27, 2018 20:08
Alias used to open File Explorer from within Bash on WSL.
open() {
target_path=$(wslpath -a -w $(readlink -f $1)) # resolve the path
/mnt/c/Windows/explorer.exe $target_path # open the path
}
@JacobDB
JacobDB / ssh-on-wsl.md
Created October 29, 2018 22:53
Setting up SSH Server on WSL
  1. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  2. chmod 700 ~/.sssh
  3. chmod 600 ~/.ssh/auhotirzed_keys
@JacobDB
JacobDB / .htaccess
Last active November 9, 2018 15:25
Clone a repository, generate a symlink, and protect the deployment folder for use with git-deploy – https://github.com/vicenteguerra/git-deploy
Order Allow,Deny
Deny from all
<Files "deploy.php">
Allow from all
</Files>
@JacobDB
JacobDB / renew-letsencrypt.sh
Created November 16, 2018 17:08
Simple bash script to disable UFW, renew Lets Encrypt certificates, restart GitLab nginx, and re-enable UFW
ufw disable
certbot renew --renew-hook "/usr/bin/gitlab-ctl restart nginx"
ufw --force enable
@JacobDB
JacobDB / atom.sh
Last active February 13, 2019 15:42
Alias used to open Atom from within Bash on WSL.
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
}
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;