Skip to content

Instantly share code, notes, and snippets.

View jodytate's full-sized avatar

jody tate jodytate

View GitHub Profile
@jodytate
jodytate / awfice.txt
Last active November 21, 2020 01:16
awfice
data:text/html,<html contenteditable>
data:text/html,<body contenteditable style="line-height:1.5;font-size:20px;">
from https://zserge.com/posts/awfice/
@jodytate
jodytate / asciiputsonglasses
Created December 29, 2017 21:11 — forked from staringispolite/asciiputsonglasses
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
@jodytate
jodytate / watchersPerScope.js
Created January 6, 2016 22:52
the number of watchers
var watchersPerScope = $('.ng-scope').map(function() {
var s = $(this).scope();
if(s.$$destroyed) return 0;
return (s.$$watchers || 0) && s.$$watchers.length;
}).get();
var totalWatchers = 0;
for(var i=0; i<watchersPerScope.length; i++)
totalWatchers += watchersPerScope[i];
console.log(totalWatchers);
@jodytate
jodytate / shuffle-trello.js
Last active August 29, 2015 14:22
load jquery and shuffle trello cards
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
setTimeout(function() {
jQuery.noConflict();
console.log('jQuery loaded');
}, 1000);
void(0);
$('div.list div.list-card').sort(function(){
@jodytate
jodytate / shuffle trello cards
Last active August 29, 2015 14:22
shuffle trello
$('div.list div.list-card').sort(function(){
return Math.random()*10 > 5 ? 1 : -1;
}).each(function(){
var $t = $(this),
color = $t.attr('class');
$t.css({backgroundColor: color}).appendTo( $t.parent() );
});
@jodytate
jodytate / gist:44ef6164736fa9ed70e8
Created May 28, 2015 18:32
detect jquery version
jQuery.fn.jquery
@jodytate
jodytate / load jquery in the browser console
Last active August 29, 2015 14:22
load jquery in the browser console
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
setTimeout(function() {
jQuery.noConflict();
console.log('jQuery loaded');
}, 1000);
void(0);
@jodytate
jodytate / index.html
Created February 21, 2015 20:35
muppet filter test
<div ng-app="muppetApp" class="container" ng-controller="muppetController">
<h1>Muppet Filter Test</h1>
<ul class="list-unstyled list-inline">
<li>First set of muppets ({{muppetsResults.length}})</li>
<li>Second set of muppets ({{moreMuppetsResults.length}})</li>
</ul>
<form class="form-group">
{
message: "The request is invalid.",
messageDetail: "The parameters dictionary contains a null entry for parameter 'entityId' of non-nullable type 'System.Int32' for method 'Scio.Web.Models.Api.ActivityParticipations GetActivityParticipations(Int32)' in 'Scio.Web.Controllers.ActivityParticipationsController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter."
}
@jodytate
jodytate / simple-proxy.js
Created December 20, 2013 23:36
simple node proxy using npm node-http-proxy
// http://stackoverflow.com/questions/15801014/how-to-use-node-http-proxy-for-http-to-https-routing
var httpProxy = require('http-proxy');
var options = {
changeOrigin: true,
target: {
https: true
}
}