This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I added this to my .bashrc but you can place it in its own file if you want | |
# TODO: find something faster than the 'find' command | |
## | |
# recursively searches through folders (only folders) inside of my ~/projects folders | |
# if it only finds 1 entry, it switches to that folder. If not, it echos all found matches | |
# takes only 1 argument | |
# usage: proj my-website | |
function proj () { | |
if [ -z "$1" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAMES="$(say -v ? | sed -E 's/^([a-zA-Z-]+\s?[a-zA-Z]+).+/\1/')" | |
echo $NAMES | |
for NAME in $NAMES | |
do | |
echo $NAME | |
say hello -v $NAME | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createElement(type, attributes, text, children =[]) { | |
if (type === 'text' && text) { | |
return document.createTextNode(text); | |
} | |
var el = document.createElement(type); | |
if (attributes) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/***************************************************************** | |
* I'm using this hook to set environment specific variables | |
* | |
* This hooks is executed before the following commands: | |
* cordova prepare | |
* cordova platform add | |
* cordova build | |
* cordova run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $ ) { | |
"use strict"; | |
/** | |
* jQuery.videoSwap.js | |
* by: https://gist.github.com/FranciscoG | |
* | |
* Switches between a silent teaser video and a full video | |
* Uses html5 <video> | |
* Very very basic "mobile" support solely based on window width | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# SHA256check.sh /path/to/file TheLongHashStringProvidedBySource | |
# - or enter the given hash at the prompt | |
PATH=$1 | |
SITEHASH=$2 | |
if [ "$SITEHASH" == "" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Takes a string representing time in a specific format and | |
* returns the total number of milliseconds for that time | |
* @param {String} timeStr The time you want to convert into ms, see below for format details | |
* @return {Number} Total number of milliseconds | |
* | |
* For now there only 3 options: | |
* (h)ours, (m)inutes, (s)econds | |
* formatting examples: | |
* timeToMS( "1h 10m 5s" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run a series of command line test to see if your site is secure | |
# based on this checklist: https://securitychecklist.org/ | |
# | |
# INCOMPLETE - still working on it | |
# | |
# Todo: download nmap | |
# Colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
function alphaInvert(str) { | |
var alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; | |
var rev = alpha.slice().reverse(); // slice makes a copy of the array | |
var result = ""; | |
str.split("").forEach(function(val,i,r){ | |
result += rev[alpha.indexOf(val)]; // indexOf IE9+ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
# Change these variables to whatever site you want to grab | |
# and where you want it to be saved | |
# | |
targetDir='' | |
site='' |