Skip to content

Instantly share code, notes, and snippets.

@StuffAndyMakes
StuffAndyMakes / Charlieplex12LEDs.cc
Last active April 30, 2024 13:10
Arduino sketch code for Charlieplexing 12 LEDs - accompanies project "Charlieplexing LEDs with an AVR ATmega328 (or Arduino)"
#define A 12
#define B 11
#define C 10
#define D 9
#define PIN_CONFIG 0
#define PIN_STATE 1
#define LED_COUNT 12
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active April 17, 2024 12:35
Using Git with Subversion Mirroring for WordPress Plugin Development
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@chrismeyersfsu
chrismeyersfsu / oscilloscope.c
Last active January 7, 2024 14:15
Arduino Poor man's oscilloscope processing code
/*
* Oscilloscope
* Gives a visual rendering of analog pin 0 in realtime.
*
* This project is part of Accrochages
* See http://accrochages.drone.ws
*
* (c) 2008 Sofian Audry (info@sofianaudry.com)
*
* This program is free software: you can redistribute it and/or modify
@benlk
benlk / 0-toc.md
Last active March 29, 2023 13:13
Collection of notes on WP_UnitTestCase
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
  • ?
@ivanvermeyen
ivanvermeyen / !NOTE.md
Last active March 15, 2023 05:25
Setup a Laravel Storage driver with Google Drive API
@miya0001
miya0001 / cors-for-the-wordpress-rest-api.php
Last active January 31, 2023 07:42
CORS for the WordPress REST API
<?php
function my_customize_rest_cors() {
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
add_filter( 'rest_pre_serve_request', function( $value ) {
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: GET' );
header( 'Access-Control-Allow-Credentials: true' );
header( 'Access-Control-Expose-Headers: Link', false );
@kieranja
kieranja / gist:10278326
Last active January 5, 2023 03:00
Laravel Batch Request
// Simple. This method allows you to make a request like http://myapi.com/api/batch?request=[{"url":"/api/profile/1", "type":"GET", "request_id":"1"}, {"url":"/api/profile/2", "type":"GET", "request_id":2}]
$requests = \Input::get('request');
$requests = json_decode($requests);
$output = array();
foreach ($requests as $request) {
$url = parse_url($request->url);
@entrity
entrity / AVR-makefile-base.mk
Last active December 5, 2022 17:35
An extensible Makefile for AVRs which makes use of the Arduino core and (optionally) Arduino libraries.
### MARKHAM'S NOTES:
# This Makefile includes the Arduino core sources. (Set ARDDIR here:)
ARDDIR = /d/arduino
# You should build a tiny Makefile for each of your projects and just declare a few
# things in it, then include this Makefile in it. Your Makefile should be in the same
# directory as your TARGET file (see below).
#
# Exemplia gratia: