Skip to content

Instantly share code, notes, and snippets.

@EHLOVader
EHLOVader / Off canvas drill down.js
Last active May 13, 2022 21:16 — forked from blift/OffCanvas.js
Drilldown menu for Wordpress sub pages. For Sage by Roots + TailwindCSS
function OffCanvas() {
const offOPen = document.getElementById('offcanvas__open');
const offMenu = document.getElementById('offcanvas__menu');
const body = document.body;
const offNav = document.querySelectorAll('.nav-secondary ul .menu-item');
// Open menu
offOPen.addEventListener('click', function () {
@EHLOVader
EHLOVader / valet-plus-destroy
Created February 10, 2020 22:04 — forked from dannygsmith/valet-plus-destroy
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@EHLOVader
EHLOVader / install_vagrant_sudoers.sh
Created November 10, 2015 01:53 — forked from GUI/install_vagrant_sudoers.sh
Allow Vagrant sudo-access without password for NFS-setup (for OS X)
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
#!/bin/bash
function switch_files {
mv $1.png $1.tmp.png
mv $1-inverse.png $1.png
mv $1.tmp.png $1-inverse.png
mv $1@2x.png $1@2x.tmp.png
mv $1-inverse@2x.png $1@2x.png
mv $1@2x.tmp.png $1-inverse@2x.png
}
<?php
/**
* An helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.0.4 on 2015-02-13.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@EHLOVader
EHLOVader / test.js
Last active August 29, 2015 14:11 — forked from Garbee/test.js
var kuary = new Kuary(window);
kuary.add({
"keys": [
'up':['up':['down':['down':['left':['right':['left':['right':['b':['a':['enter']]]]]]]]]]
],
"execute": function() {
window.alert('KONAMI');
}
});
#!/bin/bash
# Add Vagrant's hostupdater commands to sudoers, for `vagrant up` without a password
# force sudo on self.
if [ $( id -u ) -ne 0 ]; then
exec sudo -p "Login password for %p: " "$0" "$@"
exit $?
fi
# Stage updated sudoers in a temporary file for syntax checking

Security Now
TechTV's Leo Laporte and I (Steve Gibson) take 30 to 90 minutes near the end of each week to discuss important issues of personal computer security. Sometimes we'll discuss something that just happened. Sometimes we'll talk about long-standing problems, concerns, or solutions. Either way, every week we endeavor to produce something interesting and important for every personal computer user.

This Week in Tech Your first podcast of the week is the last word in tech. Join the top tech pundits in a roundtable discussion of the latest trends in high tech.

Javascript Jabber
Your Prototype for Great Code

The Changelog

#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.6.x @see https://github.com/mitchellh/vagrant/pull/3638
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
#!/bin/bash
PID_FILE=/var/run/mailcatcher.pid
NAME=mailcatcher
PROG="/usr/bin/env mailcatcher"
USER=mailcatcher
GROUP=mailcatcher
start() {
echo -n "Starting MailCatcher"