Skip to content

Instantly share code, notes, and snippets.

View brandy's full-sized avatar
🍑
Chillin

Brandon brandy

🍑
Chillin
View GitHub Profile
@brandy
brandy / compress.sh
Created July 1, 2023 04:32 — forked from threethan/compress.sh
Compress Godot HTML5 export with gunzip for smaller file size
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
# Based on https://gist.github.com/natrim/1a19f4b7668e0474897f3f28171f3b33
# wish revisions from https://gist.github.com/natrim/1a19f4b7668e0474897f3f28171f3b33?permalink_comment_id=4108811#gistcomment-4108811
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
@brandy
brandy / convert.sh
Created July 1, 2023 04:32 — forked from natrim/convert.sh
Simple conversion script that converts Godot html5 export to gzipped version, with decompressing wasm and pck files using pako
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
game="$1"
fi
@brandy
brandy / download.js
Created November 26, 2022 23:51 — forked from falkolab/download.js
Download file by http with progress (NodeJS)
function download(fileUrl, apiPath, callback) {
var url = require('url'),
http = require('http'),
p = url.parse(fileUrl),
timeout = 10000;
var file = fs.createWriteStream(apiPath);
var timeout_wrapper = function( req ) {
return function() {
@brandy
brandy / Bootstrap4Nav-Sage9.md
Created June 29, 2018 00:21 — forked from smutek/Bootstrap4Nav-Sage9.md
Bootstrap 4 Walker for Sage 9

Credit

This is a frankensteind version of the current Soil nav walker, by the Roots team, and Michael Remoero's Sagextras walker. All credit goes to those good folks. :)

Use

  • Replace the contents of header.blade.php with the attached header.
  • Copy the walker.php file to the /app directory.
  • Add walker.php to the Sage required files array in resources/functions.php - eg. on a stock Sage install the entry would look like:
/**
@brandy
brandy / Remove Gmail Image Proxy
Created May 1, 2018 19:10 — forked from marknotfound/Remove Gmail Image Proxy
A bookmarklet to remove Gmail's image proxy links so you can load locally hosted images in your Gmail inbox during email tests.
javascript:(function(){var e=new RegExp("^https://[a-zA-Z0-9]+.googleusercontent.com/proxy/[a-zA-Z0-9_-]+[=][a-zA-Z0-9-+]+#");var t=document.getElementsByTagName("img");for(var n=0;n<t.length;n++){t[n].src=t[n].src.replace(e,"")}})()
@brandy
brandy / wp-query-ref.php
Created August 24, 2017 17:29 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@brandy
brandy / ubuntu-server-setup-16.04-LAMP.md
Created May 29, 2017 10:02 — forked from Otienoh/ubuntu-server-setup-16.04-LAMP.md
LAMP Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

The setup installs the following software:

  • Apache
  • MySQL
  • PHP
  • Node
@brandy
brandy / countries.php
Created October 30, 2015 15:18 — forked from JeffreyWay/countries.php
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",