Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View savetheclocktower's full-sized avatar

Andrew Dupont savetheclocktower

View GitHub Profile
@savetheclocktower
savetheclocktower / README.md
Last active February 16, 2024 15:22
Poor-man's LEDBlinky with RetroPie and Pac-Drive

NOTE: This Gist was an early write-up of this blog post, part of what became an eleven-part series on my arcade cabinet. I'd suggest you read that post instead of this, but some of the comments on this Gist contain updates and field reports that you might find useful.

RetroPie, LED control, and you

I wanted LEDBlinky-style functionality out of my RetroPie cabinet. But I didn't need RGB control or magical frontend integration or anything like that. I had buttons with simple single-color LEDs.

I've got a simple control panel with six buttons per player. All I wanted was this:

  • When I launch Street Fighter 2, all twelve buttons should light up.
  • When I launch The Simpsons, only the first two buttons for each player should light up.
.dropzone {
background-color: #ccc;
width: 100%;
height: 200px;
border: 2px dashed #666;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
text-align:center;
-webkit-box-shadow: inset 2px 2px 10px 2px rgba(0, 0, 0, 0.5);
@savetheclocktower
savetheclocktower / default.css
Created July 22, 2011 20:52
Upscaled Mono.growlStyle
/* Mono by Christopher Lobay is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. */
body, html {
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
body:hover {
-webkit-transition: all 0.3s ease;
opacity: 1 !important;
<!DOCTYPE HTML>
<html>
<head>
<title>Test page</title>
<script type="text/javascript">
if (HTMLDivElement) {
HTMLDivElement.prototype.foo = function() { alert('aha!'); };
}
</script>
<style>
Tools by Andrew Dupont begins here.
Book 1 - Stuff
Chapter 1 - Generic Objects
Section 1 - Unscrewing
A thing can be unscrewable. A thing is usually not unscrewable.
A thing can be screw-removing. A thing is usually not screw-removing.
Process: Quick Search Box [778]
Path: /Applications/Quick Search Box.app/Contents/MacOS/Quick Search Box
Identifier: com.google.qsb
Version: 2.0.0 (2.0.0.3766)
Code Type: X86-64 (Native)
Parent Process: launchd [239]
Date/Time: 2010-07-31 20:27:18.348 -0500
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
// ==UserScript==
// @name Reddit Keyboard Navigation
// @namespace http://andrewdupont.net/greasemonkey
// @description Navigate Reddit comments. Expand, collapse, and reply
// without having to pinpoint tiny links with your mouse.
// @author Andrew Dupont
// @include http://reddit.com/*
// @include https://reddit.com/*
// @include http://*.reddit.com/*
// @include https://*.reddit.com/*
(function() {
window.setTimeout(wtf, 0);
function wtf() {
alert("wtf");
}
})();
// In Safari, try...
var enum;
//-> SyntaxError: Parse error
// IE-specific WTFs are a whole can of worms, but this one towers above all...
function handler() {
alert(window.event === window.event); // alerts 'false'
}