Skip to content

Instantly share code, notes, and snippets.

View anthonyholmes's full-sized avatar

Anthony Holmes anthonyholmes

View GitHub Profile
@anthonyholmes
anthonyholmes / Watch_ALL_VIDEOS.js
Last active November 18, 2023 21:07
Vector Solutions Training
// Click into one of the categories
// Open the developer tools
// Paste the code below
// Leave the page open until all videos are watched
// Only do one category at a time or the "complete" event for the video will fail
// You may need to lower the playback speed variable.
function asyncWaitSeconds(seconds) {
return new Promise((resolve, reject) => {
setTimeout(() => {
@anthonyholmes
anthonyholmes / getMidiNumber.js
Created February 18, 2020 22:08
Note to Midi Number
/**
* Get the midi note number of a note string
*
* @param {string} note
*
* @returns {number} MIDI note number
*/
function getMidiNumber(note) {
// Based on 1st octave of each note
@anthonyholmes
anthonyholmes / ParseLaravelSessionStorage.php
Last active January 21, 2020 22:28
Parse Session Driver for Laravel 5
<?php
namespace App;
use Parse\ParseStorageInterface;
class ParseLaravelSessionStorage implements ParseStorageInterface
{
/**
* Parse will store its values in a specific key.
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@anthonyholmes
anthonyholmes / SassMeister-input-HTML.html
Created June 26, 2014 23:12
Generated by SassMeister.com.
<div class="container">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
@anthonyholmes
anthonyholmes / fb_invite.js
Last active March 5, 2018 06:10
Facebook: Invite All Friends at Once
// First, open your admin panel on your Facebook page
// Click See All in the "Invite Friends" section
// Scroll to the bottom of the popup window so all of your friends are loaded
// Open your Console in your development tools and enter this Javascript
elms=document.getElementsByClassName("uiButton _1sm");for (i=0;i<elms.length;i++){ elms[i].click()};
// If developer tools aren't enabled, paste this in your address bar
// Note: You might need to manually type the "javascript:" part if you paste
// this because Chrome strips it when you paste it.
@anthonyholmes
anthonyholmes / directory_tree.php
Last active December 30, 2015 02:59
Recursive Directory Tree into array
<?php
$dir = __DIR__;
function gather($dir){
$tree = [];
$allFilesAndDirs = glob($dir."/*");
foreach($allFilesAndDirs as $f){
@anthonyholmes
anthonyholmes / vhost.rb
Last active December 14, 2015 23:48
Create virtual host from command line Syntax: sudo ruby vhost [path] [url] Note: Paths of your folders may be different
#!/usr/bin/ruby
# Get the path in the Sites folder
path = ARGV[0]
# Get the path in the Sites folder
url = ARGV[1]
if ARGV[2] == "third"
open('/etc/apache2/extra/httpd-vhosts.conf', 'a') { |f|
@anthonyholmes
anthonyholmes / spreadsheet.php
Last active June 23, 2018 14:58
PHP Class for Accessing Data from Google Docs Spreadsheet
<?php
Class DocDB {
private $key;
private $url;
private $file;
private $json;
private $rows;
private $data = array();
private $columns = array();