-
Add
Enable=Source
to /etc/bluetooth/audio.conf right after[General]
. -
Find address in form XX:XX:XX:XX:XX:XX of phone with
hcitool scan
. -
Pair and trust smartphone with
sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX
andsudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes
. -
Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# this script is an implementation of http://textt.net/mapi/20101018201937 | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
my ($ustream_url, $file, $stop) = @ARGV; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The following example shows how to correct detect connection status under php-cgi | |
Works under apache and nginx. Cannot get it to work under lighttpd. | |
*/ | |
ignore_user_abort(true); | |
ob_implicit_flush(true); //put these at the beginning | |
//loop and keep doing something until the user aborts | |
while (true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plistParser = require("../lib/sax").parser(false, {lowercasetags:true, trim:true}), | |
sys = require("sys"), | |
fs = require("fs"); | |
function entity (str) { | |
return str.replace('"', '"'); | |
} | |
plistParser.getInteger = function (string) { | |
this.value = parseInt(string, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Emulate `unsafeWindow` in browsers that don’t support it. | |
// ==/UserScript== | |
// http://mths.be/unsafewindow | |
window.unsafeWindow || ( | |
unsafeWindow = (function() { | |
var el = document.createElement('p'); | |
el.setAttribute('onclick', 'return window;'); | |
return el.onclick(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){a=[];yt.playerConfig.args.url_encoded_fmt_stream_map.split(",").forEach(function(d){e={};d.split("&").forEach(function(b){var b=b.split("="),c=decodeURIComponent;e[c(b[0])]=c(b.slice(1).join("="))});a.push(e)});return a})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.
Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.
On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation
OlderNewer