Skip to content

Instantly share code, notes, and snippets.

import time
from adafruit_circuitplayground.express import cpx
minolta_speeds = [1,2,4,8,15,30,60,125,250,500]
yashica_speeds = [1,2,5,10,25,50,100,300]
class ShutterSpeed:
def __init__(self, reciprocal):
@briansuda
briansuda / translations.string
Last active July 4, 2024 20:48
Triagemail Translations
Close = Loka
Settings = Stillingar
Your Information = Upplýsingar þínar
Email: = Tölvupóstur:
Name: = Nafn:
IMAP Settings = IMAP Stillingar
SMTP Settings = SMTP Stillingar
Username: = Notendanafn:
Password: = Lykilorð:
@gmazzap
gmazzap / gm-fsdfm.php
Last active November 20, 2015 07:03
WordPress plugins that allows to use the distraction-free mode that was active pre 4.1 WP version.
<?php namespace GM\FSDFM;
/**
* Plugin Name: Fullscreen Distraction-Free Mode (pre v4.1)
* Description: Allows to use the distraction-free mode that was active pre 4.1 WP version.
* Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/c081ce03a68b00d983d5
* Author: Giuseppe Mazzapica
* Author URI: https://gm.zoomlab.it
* License: MIT
* Version: 1.0.0
*/
@jondavidjohn
jondavidjohn / social_debugger.php
Created November 21, 2012 20:36
Social Debugger WordPress Plugin
<?php
/*
Plugin Name: Social Debugger
Description: Plugin to print debugging information by appending ?social_debug=true to the url within the admin
Version: 0.1
Author: Crowd Favorite
Author URI: http://crowdfavorite.com/
*/
@alexkingorg
alexkingorg / backfill-tweets.php
Created August 25, 2012 20:25
Import a list of tweet ids into Twitter Tools/WordPress.
<?php
foreach (file('/tweet-ids.txt') as $tweet_id) {
$tweet_id = trim($tweet_id);
$url = home_url('index.php').'?'.http_build_query(array(
'aktt_action' => 'import_tweet',
'tweet_id' => $tweet_id,
'social_api_key' => Social::option('system_cron_api_key')
), null, '&');
// error_log('Importing tweet '.$tweet_id.' '.$url);
@andphe
andphe / gist:3232343
Created August 2, 2012 01:41
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'