Skip to content

Instantly share code, notes, and snippets.

Barnaby Walters barnabywalters

Block or report user

Report or block barnabywalters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ServiceHelper.php
class ServiceHelper {
// @text is the full tweet text
// @shortCode is the code part of the shortlink, like nXXX0
public function shortenForTwitter($text, $shortCode=FALSE, $shortDomain=FALSE) {
$placeholders = array();
$rawTweet = $text;
View gist:5821796
"status": 200,
"likelihood": 0.88,
"requestId": "6b54dea7-0d45-4a2c-ab5d-3f749e90e2ae",
"photos": [
"url": "",
"type": "facebook",
sloria /
Last active Feb 16, 2020
WAV recording functionality using pyaudio
# -*- coding: utf-8 -*-
Provides WAV recording functionality via two approaches:
Blocking mode (record for a set duration):
>>> rec = Recorder(channels=2)
>>> with'blocking.wav', 'wb') as recfile:
... recfile.record(duration=5.0)
Non-blocking mode (start and stop recording):
You can’t perform that action at this time.