Skip to content

Instantly share code, notes, and snippets.

Zane Hooper cabloo

Block or report user

Report or block cabloo

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
@cabloo
cabloo / ControlDoNothing.php
Last active Dec 1, 2018
SynergyCP Empty Server Control
View ControlDoNothing.php
<?php
namespace App\Server\Control;
class ControlDoNothing
implements Type\ControlHandler
{
/**
* @var IpmiServerContract
*/
@cabloo
cabloo / get-part-counts.sql
Created Jul 7, 2018
Get number of uses of each part in SynergyCP
View get-part-counts.sql
SELECT parts.name, COUNT(*) FROM part_server INNER JOIN parts on parts.id = part_server.part_id GROUP BY part_id;
@cabloo
cabloo / Readme.md
Last active May 19, 2018
Deploy a CPU coin miner on a debian-based machine (must be root)
View Readme.md

Install:

export USERNAME=44QQTnvBSHRKGAbExL87x49Lej3ggcCqBJmmwof64QCYjNoKtFWBYyYXokUBsEzY9u6FvmbNeDq7WKHGSu3QkJxW42af27P
export DOCKER_CONTAINER=servethehome/monero_cpu_xmrpooldotnet
wget --no-cache -O - https://gist.githubusercontent.com/cabloo/9265493ce88a49c189e25d2d25c36a6c/raw/deploy-miner.sh | bash 
@cabloo
cabloo / Readme.md
Last active Nov 12, 2017
Deploy a server with root account access via private key + sudo user only.
View Readme.md

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

wget "https://gist.githubusercontent.com/cabloo/223528dc0c4d01caac95f7d872e38864/raw/deploy-client.sh"
bash deploy-client.sh

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

@cabloo
cabloo / DebouncedJob.php
Last active Aug 2, 2019
Debounced Laravel Jobs
View DebouncedJob.php
<?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
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
use Illuminate\Database\Migrations\Migration;
class CreateSomeRelation extends Migration
{
/**
* @var Builder
@cabloo
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")
Else
method = "GET"
@cabloo
cabloo / git_cleanup.sh
Last active Feb 27, 2016
Git cleanup merged branches
View git_cleanup.sh
git pull origin HEAD
# http://stevenharman.net/git-clean-delete-already-merged-branches
git branch --merged develop | grep -v "master" | grep -v "develop" | xargs -n 1 git branch -d
git branch
@cabloo
cabloo / disable_ipv6.sh
Last active Jan 4, 2016
Debian Necessities
View disable_ipv6.sh
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
cabloo / AddProjectNamespace.md
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
View AddProjectNamespace.md

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

([\s])([\\']{0,1})(Console|Events|Exceptions|Handlers|Helpers|Http|Models|Providers|Services)([\\;])

->

$1$2App\\$3$4
You can’t perform that action at this time.