Skip to content

Instantly share code, notes, and snippets.

View KatieK2's full-sized avatar

KatieK KatieK2

View GitHub Profile
// pre-compiled
function randomElement(array) {
var index = Math.random() * array.length | 0;
return array[index];
}
function printEmoji(emoji, num) {
if (num <= 0)
return;
process.stdout.write(randomElement(emoji));
return printEmoji(emoji, --num);
@KatieK2
KatieK2 / rolling-spider-eye-codes.md
Last active January 18, 2022 00:49
The LEDs in Parrot's Rolling Spider drone tell you the status of the bot.

#Rolling Spider Eye Codes

The LEDs in Parrot's Rolling Spider drone tell you the status of the bot. Here's what they mean, I think.

  • Left: Off / Right: Red = Charging
  • Left: Green / Right: Green = Connected via Bluetooth
  • Left: Off / Right: Off = Done Charging or Powered Off?
  • Left: Red / Right: Red = Turning On?
  • Left: Green / Right: Red = Connected as a USB Drive?
I think you mean team...
I think you mean squad..
I think you mean gang...
I think you mean pals...
I think you mean buds...
I think you mean posse...
I think you mean phalanx...
I think you mean crew...
I think you mean crüe...
I think you mean nerds...
<ul class="theme theme--crisp">
<li>#313340</li>
<li>#f0f0e3</li>
<li>#f9c27b</li>
<li>#ef8531</li>
<li>#f36519</li>
</ul>
<ul class="theme theme--funky">
<li>#da0054</li>
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@mrchief
mrchief / LICENSE.md
Last active March 23, 2024 12:28
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@paulirish
paulirish / zIndex-bookmarklet.js
Created October 15, 2009 19:35
find all elements with a z-index and indicate what they are.
// find all elements with a z-index and indicate what they are.
// uses css outline which is not supported in IE <8
function contrast(color){ return '#' +
(Number('0x'+color.substr(1)).toString(10) > 0xffffff/2 ? '000000' : 'ffffff');
}
jQuery('*')
.filter(function(){ return $(this).css('zIndex') !== 'auto'; })
.each(function(){