Skip to content

Instantly share code, notes, and snippets.

View shawnsandy's full-sized avatar

Shawn Sandy shawnsandy

View GitHub Profile
@shawnsandy
shawnsandy / HTML5 template
Created May 10, 2020 18:17
Heml 5 templates
{
"generate html5 (basic) template": {
"prefix": "html5",
"body": [
"<!doctype html>",
"",
"<html lang=\"en\">",
"<head>",
" <meta charset=\"utf-8\">",
"",
@shawnsandy
shawnsandy / profiles.json
Last active February 22, 2020 18:56
Windows Terminal
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{00000000-0000-0000-ba54-000000000002}",
"profiles": {
"defaults": {

Bootstrap Mega Menu

A mega menu implementation using Bootstrap (unfinished - how can the indicator be positioned on the active top-level item without the relative positioning?)

A Pen by Jon Reece on CodePen.

License.

@shawnsandy
shawnsandy / index.html
Created April 10, 2018 02:26
Wavy Loading Animations
<div class="header">
<h1>Wavy Loading Animations</h1>
<h4>By: <a href="http://kylebrumm.com" target="_blank">Kyle Brumm</a></h4>
</div>
<div class="shaft-load">
<div class="shaft1"></div>
<div class="shaft2"></div>
<div class="shaft3"></div>
<div class="shaft4"></div>
@shawnsandy
shawnsandy / .bashrc
Last active February 22, 2020 12:12
Aliases -- git bash windows to
alias ls='ls -alh'
alias cdmongodata='cd /c/mongodb/data/db && ls'
alias sbrc='cd ~ && source .bashrc'
alias mydocs='cd ~/Documents'
alias dev='cd ~/devbox'
# Aliases
alias g='git'
alias gst='git status'
alias gd='git diff'
alias gdc='git diff --cached'
@shawnsandy
shawnsandy / example-umbrella.js
Created June 2, 2017 23:40
Simple example to hide display forms
u(".widget-forms").each(function (el, i) {
console.log(el);
var button = u(el).find('.tag-button');
var frm = u(el).find('.hide-tags');
console.log(frm);
u(button).on('click', function () {
console.log(u(button).text());
u(frm).toggleClass("bluform");
@shawnsandy
shawnsandy / component-example.php
Last active March 15, 2017 14:25
Laravel components
<?php
/*
* $data = dataset mixed|array|string required
* $title = component title string
* $attributes html attributes
* $view blade template optional
* */
Html::component("component_name", "dash::components.test", ["data", 'title' => 'Title', "attributes" => [], 'view']);
@shawnsandy
shawnsandy / exceptions.php
Created February 24, 2017 10:33
Laravel Custom 404
<?php
if(env("APP_DEBUG") === FALSE):
// 404 page when a model is not found
if ($exception instanceof ModelNotFoundException or $exception instanceof NotFoundHttpException) {
return response()->view('extras::errors.404', $request, 404);
}
@shawnsandy
shawnsandy / bashrc
Last active February 23, 2017 13:47
BASHRC aliases
alias gs='git status'
alias gc='git commit'
alias gcl='git clone'
alias gp='git push'
alias ga='git add'
alias gall='git add .'
alias ddev='cd /d/Apps/dev'
alias builds='cd /d/Apps/builds'
alias devcode='cd /d/DevCode'
alias apps='cd /d/Apps'
@shawnsandy
shawnsandy / maps-embed.php
Last active February 22, 2017 13:33
Google Maps Embed
<?php
// https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=API_KEY
if (isset($address)) {
$add = urlencode('342 glenn ivy terrace spring hill fl 34608');
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=$add&sensor=false";
$data = file_get_contents($url);
$geo = json_decode($data);
$this->lat = $geo->results[0]->geometry->location->lat;
$this->long = $geo->results[0]->geometry->location->lng;