Skip to content

Instantly share code, notes, and snippets.

View fuzzywalrus's full-sized avatar

Greg Gant fuzzywalrus

View GitHub Profile
@fuzzywalrus
fuzzywalrus / Big Sur Icon Changer by HueZuX.sh
Created February 9, 2023 02:40
Big Sur Icon Changer by HueZuX
#!/bin/bash
echo "+--------------------------------+"
echo "| Big Sur Icon Changer by HueZuX |"
echo "+--------------------------------+"
echo ""
echo "Root password will be required. To enable root user, see:"
echo "https://support.apple.com/en-us/HT204012"
echo ""
@fuzzywalrus
fuzzywalrus / gulpfile.js
Last active March 9, 2021 00:43
Gulp 4.x with Sass, JS, BrowserSync
// Load plugins
const gulp = require("gulp");
const sass = require('gulp-sass');
const cleanCSS = require('gulp-clean-css');
const gulpif = require('gulp-if');
const rename = require('gulp-rename');
const kit = require('gulp-kit-2');
const { series, watch } = require("gulp");
const browsersync = require('browser-sync').create();
@fuzzywalrus
fuzzywalrus / responsivevideo.js
Created August 2, 2019 17:39
Responsive Video JS
//es5 for max browser compatible, works with mutliple videos on a page. No resize event.
//get all vids
var video = document.querySelectorAll('video')
//add source to video tag
function addSourceToVideo(element, src) {
var source = document.createElement('source');
source.src = src;
source.type = 'video/mp4';
@fuzzywalrus
fuzzywalrus / script-load-fail.js
Last active November 22, 2017 22:48
Check if any given script has errored on load
var myScript = document.createElement('script');
myScript.src = 'http://www.madeupurl.com/script.js';
myScript.onload = function() {
console.log('Script loaded.');
};
myScript.onerror = function() {
console.log('script failed.');
};
@fuzzywalrus
fuzzywalrus / pure css circular progress bar.scss
Created October 23, 2017 23:29
This uses a data-attribute to create the progress bar. Forked from https://bootsnipp.com/snippets/featured/circle-progress-bar. This functions based on increments defined in the the scss. Change the $howManySteps var and the for loops below will generate the CSS. The data attributes will need to be changed to reflect the newly generated CSS. Let…
//styling
$borderWidth: 7px;
$animationTime: 1.5s;
$border-color-default: #eee;
$border-color-fill: #ffb43e;
$size: 150px;
//Create how many steps
$howManySteps: 10; //this needs to be even.
@fuzzywalrus
fuzzywalrus / imageconversion.sh
Created August 20, 2017 19:54
Simple image conversion script design create from a double density asset both @2x and @1x versions of said image in JPEG, JPEG2000, WebP for HTML5 picture elements.
# simple image conversion script design create from a double density asset both @2x and @1x versions of said image in JPEG, JPEG2000, WebP for HTML5 picture elements.
# Requires Zenity, ImageMagick with JPEG2000, MozJPEG, and Webp
# brew install imagemagick --with-openjpeg
# brew install webp
# brew install mozjpeg
# brew install zenity
file=$(zenity --file-selection --title="Select a File")
datafill=`zenity --forms \