Skip to content

Instantly share code, notes, and snippets.

@rauhryan
rauhryan / sln
Created April 29, 2012 18:35
bash function to open sln files in windows
# Add this to your ~/.bashrc
function sln() {
if [ $(find . -type f -name "*.sln" | wc -l) == 1 ]; then
start $(find . -type f -name "*.sln")
else
select x in $(find . -type f -name "*.sln")
do
start $x
break
@chrishulbert
chrishulbert / ssdp.node.js
Created March 30, 2011 21:46
Service discovery using node.js and ssdp / universal plug n play
var dgram = require('dgram'); // dgram is UDP
// Listen for responses
function listen(port) {
var server = dgram.createSocket("udp4");
server.on("message", function (msg, rinfo) {
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
});