Skip to content

Instantly share code, notes, and snippets.

@stugoo
stugoo / editPage.js
Created June 5, 2019 10:03 — forked from pmarquees/editPage.js
Edit page (bookmarklet)
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
@stugoo
stugoo / typography.scss
Created January 9, 2019 12:24
SCSS heading declarations
@import './src/library/core/variables';
@import './src/library/mixins/media-queries';
@import './src/library/mixins/rems';
@mixin text-light() {
font-family: $font__base;
font-weight: lighter;
font-style: normal;
}
@mixin text-regular() {
@stugoo
stugoo / media-queries.scss
Created January 8, 2019 12:50
Media Queries scss
$base-font-size: 16;
// Major Breakpoints
$breakpoint__small: 480;
$breakpoint__medium: 960;
$breakpoint__large: 1280;
$breakpoint__sitemax: 1440;
/* ==========================================================================
= Media Queries
update wp_options set option_value = replace(option_value,'string_to_find','string_to_replace');
update wp_posts set guid = replace(guid,'string_to_find','string_to_replace');
@stugoo
stugoo / console.js
Created February 16, 2015 11:04
prevent console errors in old IE
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function noop() {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
@stugoo
stugoo / Gruntfile.js
Created April 1, 2014 13:23
Grunt, scss and hbs for turning svgs into icons and pngs,
// requires
/*
* https://github.com/filamentgroup/grunticon
* https://www.npmjs.org/package/grunt-text-replace
*/
'use strict';
module.exports = function (grunt) {
@stugoo
stugoo / modernizr-ios6-test.js
Created November 21, 2013 12:50
IOS 6 modernizer test, needed this for super edge case on iPad on landscape. :/
// i know, i know, browser sniffing :(
// adaptation of http://stackoverflow.com/questions/8348139/detect-ios-version-less-than-5-with-javascript
Modernizr.addTest('ios6', function() {
var ios6 = false,
v, ver = false;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/),
ver = parseInt(v[1], 10);
@stugoo
stugoo / Preferences.sublime-settings
Created September 11, 2013 08:55
Sublime text config
{
"bold_folder_labels": true,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb",
".svn"
],
@stugoo
stugoo / hover.js
Created August 22, 2013 11:55
highlighting a table cell and all others behind it until the first item.
calendarTo.on('mouseover', 'td', function(){
var tds = calendarTo.find('td').not('.ui-datepicker-other-month');
fromTd = tds.filter('.ui-state-range:first');
thisTd = $(this);
startIndex = tds.index(fromTd);
@stugoo
stugoo / select-increment-15min-24hr-clock
Created August 19, 2013 11:38
so I never have to do it again.
<select>
<option value="00:00">00:00</option>
<option value="00:15">00:15</option>
<option value="00:30">00:30</option>
<option value="00:45">00:45</option>
<option value="01:00">01:00</option>
<option value="01:15">01:15</option>
<option value="01:30">01:30</option>
<option value="01:45">01:45</option>
<option value="02:00">02:00</option>