Skip to content

Instantly share code, notes, and snippets.

// https://github.com/mozilla/chromeless/blob/master/modules/lib/net.js
var net = require('net'),
server = net.Server();
server.listen(8111, 'localhost', function(){
console.log('listen');
});
server.on('connection', function(stream){
@eerne
eerne / String.substitute.js
Created July 19, 2011 15:38 — forked from ibolmo/String.substitute.js
Add support for paths in String.substitute
/*
---
...
*/
String.implement({
substitute: function(object, regexp){
return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){
@eerne
eerne / appify
Created July 19, 2011 18:52 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
appify v3.0.0 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
var net = require('net');
// http://nodejs.org/docs/v0.5.2/api/net.html
var server = net.createServer(function(socket){
socket.end('goodbye\n');
});
// http://nodejs.org/docs/v0.5.2/api/streams.html#readable_Stream
@eerne
eerne / build.sh
Created December 13, 2011 21:14
build pd
git clone git://pure-data.git.sourceforge.net/gitroot/pure-data/pure-data
cd pure-data
./autogen.sh
CFLAGS="-mmacosx-version-min=10.5" ./configure --enable-universal=i386
make -j3
cd src
./pd -nogui
@eerne
eerne / README.md
Created July 19, 2012 17:04 — forked from subtleGradient/README.md
How to create a double-click-to-start web server

How to create a double-click-to-start web server

  1. Download the "Start HTTP Server Here.command" file
    • In Safari you can do that by ⌥ (option) clicking the "raw" link next to that script.
  2. Add the executable flag
    so that it will run when you double-click it
    • type chmod +x "$HOME/Downloads/Start HTTP Server Here.command"
  3. Move the command file into the root folder of your website
  4. Double-click it to start your webserver.
    Your browser will load it up automatically
@eerne
eerne / makeapp.sh
Last active December 19, 2016 23:27 — forked from demonbane/makeapp.sh
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"