Skip to content

Instantly share code, notes, and snippets.

CyberPunkCodes /
Last active February 14, 2022 19:06
XAMPP Backer Upper
echo "Running XAMPP Backer Upper"
# The full path to the XAMPP root installation. No trailing slash.
XAMPP_ROOT_LOCATION="" # ie: /Applications/XAMPP
BACKUP_ROOT_LOCATION="" # ie: /Users/username/Desktop
BACKUP_TIME=`date +"%m-%d-%Y_%H-%M-%S"`
View yii2-post-receive-example
APP_NAME=YOURAPPNAME # ".git" will be added and should match your bare repo filename
APP_DIR="public_html/prod" # include "public_html", do not start with forward slash!
PHP="php -d allow_url_fopen=1 -d memory_limit=256M -d suhosin.executor.include.whitelist=phar"
COMPOSER="$PHP $HOMEDIR/bin/composer.phar"
CyberPunkCodes / .htaccess
Created August 28, 2018 18:23
htaccess Force HTTPS and WWW - Subdomain friendly - Dynamic
View .htaccess
Options -Indexes
RewriteEngine On
# This goes first!
# Force www prefix
RewriteCond %{HTTP_HOST} !^(www\.)(.*) [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# This goes second!
CyberPunkCodes / aliases.zsh
Last active September 4, 2022 00:13
Oh-My-Zsh - Best and Most Helpful - My Custom ZSH Aliases - Tips Hack Help Info Doc Tutorial
View aliases.zsh
# Source Reload
alias reload.zsh="source ~/.zshrc"
alias reload.profile="source ~/.bash_profile"
alias reload.term="source ~/.bash_profile && source ~/.zshrc"
# cd
alias ..="cd .."
# ls
alias ll="ls -AlhG"
View vscode-git-status-tree-hack.js
function injectGitFileStatus()
const timeout = 5000;
const addedColor = "#8dc149";
const modifiedColor = "#cbcb41";
const stagedColor = "#ca2820";
const ignoredOpacity = "0.4";
const explorer = document.getElementById("workbench.view.explorer");
if (explorer)
CyberPunkCodes / yii2-drop-all-tables-from-database.php
Last active June 10, 2021 19:31 — forked from mbischof/yii-drop-all-tables-from-database.php
*UPDATED*: How to drop all tables from database using Yii2. Includes disabling foreign key checks, fixed app() and execute().
View yii2-drop-all-tables-from-database.php
Yii::$app->db->createCommand("SET foreign_key_checks = 0")->execute();
$tables = Yii::$app->db->schema->getTableNames();
foreach ($tables as $table) {
Yii::$app->db->createCommand("SET foreign_key_checks = 1")->execute();
CyberPunkCodes /
Last active November 21, 2022 16:41
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
CyberPunkCodes / osx-install-composer.txt
Created June 13, 2016 19:52
My OSX Composer Install Guide
View osx-install-composer.txt
Create a new directory in /usr/local for composer, and setup directory for downloading the installer.
-> cd /usr/local
-> mkdir composer
-> cd composer
-> mkdir setup
-> cd setup
Inside the setup directory, we are going to follow the instructions to download Composer.
CyberPunkCodes / XBOX 360 HQ.plist
Created March 2, 2015 09:00
My custom High Quality XBOX 360 Compatible Handbrake profile. Video: AVC, 3000kbps Constant, High@L4.1 - Audio: AC3, 640kbps Constant, 6ch. This does make an MKV, which the 360 doesn't support. You will need to use My MP4Box GUI or similar to change the container to MP4. There are some issues getting Handrbake to go MKV to MP4 directly.
View XBOX 360 HQ.plist
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">