Skip to content

Instantly share code, notes, and snippets.

View jstncno's full-sized avatar

Justin Cano jstncno

View GitHub Profile
@jstncno
jstncno / _README.md
Created June 21, 2017 06:51 — forked from oleq/_README.md
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@jstncno
jstncno / build.sbt
Created October 30, 2015 19:44 — forked from miguno/build.sbt
build.sbt for Apache Kafka 0.8.0 for Scala 2.10 with sbt 0.13.0. Note: The code uses the Apache Staging repository because we use the latest release candidate (RC) of Kafka 0.8.0. For official Kafka releases you don't need that staging repository.
name := "kafka-0.8-with-scala-2.10-example"
version := "1.0"
scalaVersion := "2.10.3"
sbtVersion := "0.13.0"
// Required to retrieve Kafka 0.8.0-rc5 artifacts; once Kafka 0.8.0 is officially released
// you don't need to use the Apache Staging repo anymore.
# rename origin remote
git remote rename origin github
# add the gitlab remote (for the love of everything that’s holy, use ssh)
git remote add bitbucket <remote link for bitbucket>
# push existing code to new remote
git push -u bitbucket —all
# let’s magic
@jstncno
jstncno / recorder.py
Last active August 29, 2015 14:15 — forked from sloria/recorder.py
# -*- coding: utf-8 -*-
'''recorder.py
Provides WAV recording functionality via two approaches:
Blocking mode (record for a set duration):
>>> rec = Recorder(channels=2)
>>> with rec.open('blocking.wav', 'wb') as recfile:
... recfile.record(duration=5.0)
Non-blocking mode (start and stop recording):

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
<?php
require 'tmhOAuth.php'; // Get it from: https://github.com/themattharris/tmhOAuth
// Use the data from http://dev.twitter.com/apps to fill out this info
// notice the slight name difference in the last two items)
$connection = new tmhOAuth(array(
'consumer_key' => '',
'consumer_secret' => '',
'user_token' => '', //access token