Skip to content

Instantly share code, notes, and snippets.

View jr-codes's full-sized avatar

JR Shampang jr-codes

  • DISCO
  • Milwaukee, WI
View GitHub Profile
@jr-codes
jr-codes / input.scss
Created June 29, 2021 18:14
Generated by SassMeister.com.
@mixin build-class($class, $min: 0, $max: 100, $orientation: 'small', $type: 'normal') {
.luna-#{$class}-#{$orientation} {
color: blue;
}
}
@include build-class('test', 'large');
@jr-codes
jr-codes / open-json.user.js
Created August 19, 2016 21:32
Userscript for opening JSON in the Chrome JSON Viewer extension
// ==UserScript==
// @name Open JSON
// @version 1.0.0
// @description Opens JSON in a json-viewer window
// @match http://*/*
// @match https://*/*
// ==/UserScript==
const exec = fn => {
const script = document.createElement('script');
// Usage:
// Put this in a separate file and load it as the first module
// (See https://github.com/jrburke/requirejs/wiki/Internal-API:-onResourceLoad)
// Methods available after page load:
// rtree.map()
// - Fills out every module's map property under rtree.tree.
// - Print out rtree.tree in the console to see their map property.
// rtree.toUml()
// - Prints out a UML string that can be used to generate UML
// - UML Website: http://yuml.me/diagram/scruffy/class/draw
@jr-codes
jr-codes / u.user.js
Last active May 2, 2024 02:45
u.js userscript
// ==UserScript==
// @name u.js
// @namespace http://zarjay.net/
// @description Utility functions for browser console ninjas
// @include *
// @version 0.28
// ==/UserScript==
exec(function() {
// Current version of u.js
@jr-codes
jr-codes / script.user.js
Created November 16, 2012 06:10
Userscript Boilerplate
// ==UserScript==
// @name Userscript Name
// @namespace http://example.com/
// @description Userscript Description
// @match http://example.com/* (or @include * to include all pages)
// @version 1.0
// ==/UserScript==
// Emulate Greasemonkey's unsafeWindow in Chrome
window.unsafeWindow = window.unsafeWindow || (function() {
@jr-codes
jr-codes / gcal-kill-tasks.user.js
Created August 29, 2012 05:07
Google Calendar Tasks Killer
// ==UserScript==
// @name Google Calendar Tasks Killer
// @namespace http://zarjay.net/
// @description Removes the "Tasks" item from the "My Calendar" section of Google Calendar
// @match https://www.google.com/calendar/*
// @version 1.0
// ==/UserScript==
// Removes the "Tasks" item from "My Calendar"
@jr-codes
jr-codes / include-callback.js
Last active May 2, 2024 02:45
include(): JavaScript function for dynamically including a CSS or JS file on a page
/**
* Includes the CSS or JS file into the head of the page.
*
* Examples:
* include('http://example.com/script.js')
* include('http://example.com/style.css')
* include('http://example.com/script.php', 'js')
* @param {string} url URL of the CSS or JS file
* @param {string} [type] 'css' or 'js' to specify the type of file.
* This parameter is optional, but it should be