Skip to content

Instantly share code, notes, and snippets.

View tbuchanan's full-sized avatar

Tyler Buchanan tbuchanan

View GitHub Profile
@tbuchanan
tbuchanan / window-resize-end.js
Created November 8, 2018 23:20 — forked from agragregra/window-resize-end.js
Window resize-end function
//Resize Window
function onResize() {
};
var doit;
doit = setTimeout(onResize, 400);
window.onresize = function() {
clearTimeout(doit);
doit = setTimeout(onResize, 400);
};
@tbuchanan
tbuchanan / youtube360check.js
Created April 7, 2016 00:18 — forked from dhinus/youtube360check.js
Check if browser supports Youtube 360 video
function browserSupports360 () {
// YouTube supports 360 videos in a limited set of browsers,
// see https://support.google.com/youtube/answer/6178631
var ua = navigator.userAgent;
// No mobile browser is supported at the moment
if (/Mobile/.test(ua) || /Tablet/.test(ua)) return false;
// Chrome >= 40
@tbuchanan
tbuchanan / slack_delete.rb
Created January 26, 2016 20:24 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
$critical-css-only:true !default;
@mixin critical($critical-only:true){
@if (($critical-css-only and $critical-only) or (not $critical-css-only and not $critical-only)){
@content;
}
}