# Mirror of the instructions available here:
# These commands CANNOT be run in a script.
# They're just for reference.
# Install on Raspbian Jessie, or upgrade from Wheezy.
# Make sure all packages are upgraded (update && upgrade).
View getMp3StreamTitle.php
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';
View gist:80fa81e6e05e2327db9d76bb727f24fe
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd( server and setup account admin@localhost.local
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts localhost.local
NOTE: Also download Psi(, and make sure you can connect to your ejabberd server.
2. Download strophe( and place it (eg: /Users/makoto/work/sample/strophejs-1.0)
View map.js
function initMap() {
navigator.geolocation.getCurrentPosition(centerMap, locationError);
$scope.correctDir = false;
var options = {
types: [],
componentRestrictions: {country: 'co'}
var input = document.getElementById("address-auto");
var autocomplete = new google.maps.places.Autocomplete(input, options);
autocomplete.addListener('place_changed', function() {placeMarker(autocomplete)});
View firebase.php
// Constants
$NODE_DELETE = "temperature.json";
$NODE_GET = "temperature.json";
$NODE_PATCH = ".json";
$NODE_PUT = "temperature.json";
// Data for PUT
View add_item.php
* Author: David T. Sadler (
* Date: 2013-03-29
* License: I release this example into the public domain. Use at your own risk.
* Example showing how to list an item to the eBay Sandbox using the eBay Accelerator Toolkit New Schema (EbatNS) for PHP.
* This example uses version 815 released on the 2013-03-22.
View gist:0bf4d4ce2f35f3a6feeca0a5c325a160
$m = new MongoClient(); // connect to local mongodb
$db = $m->products; //select 'mongo database' named products
$clothing_col = $db->clothing; //create a collection from the 'table' clothing
//create the aggregation
//create the Match on clothing-category = shoes or brand = nike
$ops = array(
'$match' =>
array('$or' =>
View public-app.js
var app = angular.module('app', ['ngResource']);
app.config(function($locationProvider, $routeProvider) {
// $locationProvider.html5Mode(true);
.when('/', { templateUrl: 'partials/index', controller: 'ctrl' })
.when('/about', { templateUrl: 'partials/about', controller: 'ctrl' })
## Debian / Linux / Ubuntu / LSB
## Startup script for Express / Node.js application with the forever module
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin
View mysql-backup-windows.bat
@echo off
set dbUser=root
set dbPassword=password
set backupDir="C:\Documents and Settings\user\Desktop\backup\mysql"
set mysqldump="C:\Program Files\MySQL\MySQL Workbench 5.2 CE\mysqldump.exe"
set mysqlDataDir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data"
set zip="C:\Program Files\7-Zip\7z.exe"
:: get date