Skip to content

Instantly share code, notes, and snippets.


Zane H cabloo

View GitHub Profile
cabloo /
Last active Mar 2, 2021
Deploy a CPU coin miner on a debian-based machine (must be root)


export USERNAME=44QQTnvBSHRKGAbExL87x49Lej3ggcCqBJmmwof64QCYjNoKtFWBYyYXokUBsEzY9u6FvmbNeDq7WKHGSu3QkJxW42af27P
export DOCKER_CONTAINER=servethehome/monero_cpu_xmrpooldotnet
wget --no-cache -O - | bash 
cabloo /
Last active Nov 12, 2017
Deploy a server with root account access via private key + sudo user only.

Run this on your local machine, it will run the scripts below for you:

wget ""

You will need to follow the prompts and then enter the root password of the remote server twice.

cabloo / DebouncedJob.php
Last active Mar 2, 2021
Debounced Laravel Jobs
View DebouncedJob.php
namespace App\Support\Jobs;
use Illuminate\Contracts\Queue\ShouldQueue;
class DebouncedJob implements ShouldQueue
use \Illuminate\Foundation\Bus\DispatchesJobs;
use \App\Support\Cache\PrefixedCache;
View 2016_05_14_172105_CreateSomeRelation.php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
use Illuminate\Database\Migrations\Migration;
class CreateSomeRelation extends Migration
* @var Builder
cabloo / curl.vbs
Created Mar 21, 2016
VBScript mini CURL
View curl.vbs
Set colNamedArguments = WScript.Arguments.Named
url = colNamedArguments.Item("url")
data = ""
ContentType = "application/x-www-form-urlencoded"
If colNamedArguments.Exists("method") Then
method = colNamedArguments.Item("method")
method = "GET"
cabloo /
Last active Feb 27, 2016
Git cleanup merged branches
git pull origin HEAD
git branch --merged develop | grep -v "master" | grep -v "develop" | xargs -n 1 git branch -d
git branch
cabloo /
Last active Jan 4, 2016
Debian Necessities
echo "# Disable IPV6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.eth0.disable_ipv6 = 1" >> /etc/sysctl.conf
cabloo /
Last active Dec 8, 2016
Add a root namespace (e.g. App) to a Laravel project that doesn't have one. Afterwards, set the namespace in phpspec.yml

Add a root namespace (e.g. App) to a Laravel project that doesn't have one.



cabloo / Git
Last active Aug 29, 2015
Sync with remotes and create new git branch
View Git


  • Put gitbr in /usr/local/bin.
  • If necessary, replace master and origin with the main branch and remote of the repository.
  • Make it executable (chmod +x /usr/local/bin/gitbr).


  • Run gitbr with no arguments to have the branch name generated for you (e.g. 04-13-001274741-2015).
  • Run gitbr <branch_name_here> to use a specific branch name.
cabloo / Git Pull
Last active Mar 3, 2017
Create Pull Request on GitHub with same title as last commit message
View Git Pull


  • Generate a GitHub Access Token with repo:status access.
  • Put in a scripts directory (I use ~/scripts/python/) and update it with your github access token.
  • Save gitpr as /usr/bin/gitpr and make it executable (chmod +x /usr/bin/gitpr). Then update the value of scripts_dir to the directory you saved in.
  • Optional: Install pyperclip with sudo pip install pyperclip. If pyperclip is detected, the link to the Pull Request on GitHub will be copied to your clipboard.
  • Optional: if you are using a repository that takes Pull Requests at a branch other than master, you will have to add the repository to the target_branches dict with the repo as the key and the target branch as the value. See the code for an example.