Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / shiftin_out.ino
Created May 2, 2014 15:22
Shift In - Shift Out
int latchPin = 8; // Pin connected to ST_CP of 74HC595
int dataPin = 9; // Pin connected to DS of 74HC595
int clockPin = 10; // Pin connected to SH_CP of 74HC595
int sinPin = 5; // Serial input pin from 74HC165
int sclkPin = 6; // Clock pin to '165
int loadPin = 7; // parallel load pin of '165
void setup() {
anonymous
anonymous / FunkyClouds_alpha
Created June 30, 2014 11:05
FunkyClouds (alpha version)
/*
Funky Clouds Compendium (alpha version)
by Stefan Petrick
An ever growing list of examples, tools and toys
for creating one- and twodimensional LED effects.
Dedicated to the users of the FastLED v2.1 library
by Daniel Garcia and Mark Kriegsmann.
<html>
<head>
<title>Hello River</title>
<!--
The Hello World of Rivers
https://github.com/scripting/river5/blob/master/docs/HELLOWORLD.md
-->
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active June 5, 2025 21:26
Chrome Extension Workshop
@caseywatts
caseywatts / bookmarkleting.md
Last active July 14, 2025 19:29
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

@paulmason
paulmason / shop.js
Last active January 10, 2016 13:59
Instagram Feed
// Copy the instagramFeed function between the two commented lines
// ...
// mobileMenu(); COPY BELOW THIS LINE
instagramFeed = function() {
var client_id, feed_url, getImages, items_to_load, username;
client_id = 'xxxxxxxxxxxxxxxxxxxxx'; // <-- REPLACE THE X's WITH YOUR CLIENT ID
username = $('.instagram-widget').attr('data-username');
if (username.length < 1) {
return;
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active February 5, 2025 03:03
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@josephg
josephg / 0dedict.py
Last active June 7, 2025 19:48
Apple dictionaries
# Thanks to commenters for providing the base of this much nicer implementation!
# Save and run with $ python 0dedict.py
# You may need to hunt down the dictionary files yourself and change the awful path string below.
# This works for me on MacOS 10.14 Mohave
from struct import unpack
from zlib import decompress
import re
filename = '/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/9f5862030e8f00af171924ebbc23ebfd6e91af78.asset/AssetData/Oxford Dictionary of English.dictionary/Contents/Resources/Body.data'
f = open(filename, 'rb')
@atuline
atuline / demoreel100withbutton.ino
Last active October 12, 2022 21:03
Demoreel100 with a button
/*
Title: DemoReel100 with Button
By: Mark Kriegsman
Button added by: Andrew Tuline
/* Arduino UNO with 3x3 LED Array using row column scanning with PWM and only using built in ports.
*
* Author: Andrew Tuline
*
* Date: July 14, 2012
*
* This does not use any 3rd party chips, thus easy to use in a Lilypad.
*
* Uses synchronized PWM to support LED brightness.
*