Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@JamesNewton
JamesNewton / PinReadWrite.ino
Last active August 30, 2023 01:10
Simple Arduino script to set pins high, low, input, pull up, or analog/servo, clock in or out data, with timing/start/stop, and read all or a single pin back via serial IO. NOTE: THIS HAS BEEN REPLACED BY https://github.com/JamesNewton/Arduino_Dynamixel_Stepper_Controller
/*
PinReadWrite.ino
//20170512 initial version
//20170517 uS timing (was mS), vars are longs, i2C start/stop, and clock IN data w/.
//20201002 Returns valid JSON.
Simple Arduino script to set pins high, low, input, pull up, or analog/servo,
clock out data with timing, and read all or a single pin back via serial IO.
Written for the tiny-circuits.com TinyDuino in the end effector of the
Dexter robot from HDRobotic.com, but generally useful to turn the Arduino
@ilevantis
ilevantis / Mixcloud RSSifier
Last active February 15, 2024 08:38
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
@spekkionu
spekkionu / composer.json
Created October 9, 2014 20:07
Standalone validation using laravel validation component
{
"name": "spakkionu/validate",
"description": "Validation Test",
"require": {
"illuminate/validation": "~4.2.9"
},
"license": "MIT",
"authors": [
{
"name": "Jonathan Bernardi",
@2bard
2bard / translation_notes
Created December 18, 2012 16:29
Using Symfony translation component in Twig outside of Symfony2 framework.
Note: I've left some of the full package names in tact to show exactly where the class comes from.
#### Pull dependencies in using composer ####
//Example composer.json
{
"require": {
"symfony/config" : "2.1.0",
"symfony/yaml" : "2.1.0",
"twig/twig": "1.9.0",