I hereby claim:
- I am webdevbrian on github.
- I am webdevbrian (https://keybase.io/webdevbrian) on keybase.
- I have a public key ASAAGFcB9wo1sKpD-l0WASy8tVl70TJeYVN6vvaJACOJoQo
To claim this, I am signing this object:
| // Avoid `console` errors in browsers that lack a console. | |
| (!window.console || !console.log) && function () { | |
| var e = function () {}, t = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "exception", "group", "groupCollapsed", "groupEnd", "info", "log", "markTimeline", "profile", "profileEnd", "markTimeline", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], | |
| n = t.length, | |
| r = window.console = {}; | |
| while (n--) r[t[n]] = e | |
| }(); |
| /* Hierarchy CSS Debugging */ | |
| * { outline: 2px dotted red } | |
| * * { outline: 2px dotted green } | |
| * * * { outline: 2px dotted orange } | |
| * * * * { outline: 2px dotted blue } | |
| * * * * * { outline: 1px solid red } | |
| * * * * * * { outline: 1px solid green } | |
| * * * * * * * { outline: 1px solid orange } | |
| * * * * * * * * { outline: 1px solid blue } |
| // Check email addresses | |
| function isValidEmailAddress(emailAddress) { | |
| var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i); | |
| return |
| function $$(selector){ | |
| return Array.prototype.slice.call(document.querySelectorAll(selector), 0); | |
| } |
| JS: | |
| // Get the initial position of the header | |
| var headerStick = $('.header').offset().top; | |
| $(window).scroll(function(){ | |
| $(window).scrollTop() > headerStick ? $('.header,.headerAlias').addClass('active') : $('.header,.headerAlias').removeClass('active'); | |
| }); | |
| CSS: |
| #OSX Tweaks: | |
| =========== | |
| - Most need reboot to show changes | |
| - Most of these tweaks are just for speed, but some are specific for development | |
| - All of these are to be ran in terminal. The commands to be copy and pasted start after the less-than sign. | |
| - I'm not responsible for any adverse effects to your computer, at all. | |
| ##Increase the speed of OS X dialogs boxes: |
| // Validator additional methods | |
| $.validator.addMethod("check_date_of_birth", function(value, element) { | |
| var day = $("#dobd").val(); | |
| var month = $("#dobm").val(); | |
| var year = $("#doby").val(); | |
| var age = 18; | |
| var mydate = new Date(); | |
| mydate.setFullYear(year, month-1, day); |
| /* #Media Queries | |
| ================================================== */ | |
| /* Smaller than standard 960 (devices and browsers) */ | |
| @media only screen and (max-width: 959px) {} | |
| /* Tablet Portrait size to standard 960 (devices and browsers) */ | |
| @media only screen and (min-width: 768px) and (max-width: 959px) {} | |
| /* All Mobile Sizes (devices and browser) */ |
I hereby claim:
To claim this, I am signing this object:
You can have this run automatically on your mac using the native launchd system if you want ...(see the spotify_song.sh file below). Or just start it manually to share what you're listening to. 🤷🏼♂️
Drop the following PLIST into ~/Library/LaunchAgents/com.user.slack-spotify.plist:
The filename must match the string under Label, replace /PATH/TO/SCRIPT.sh with an actual path to the .sh script above.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">