Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
'use strict'; | |
// run using this fork of NodeJS | |
// https://github.com/targos/node/commits/v8-5.4 (https://github.com/nodejs/node/pull/8317) | |
// | |
// node --harmony_async_await await_thenables.js | |
function counter(count) { | |
return { | |
then: function(res, rej) { |
A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh
var cluster = require('cluster'); | |
var PORT = +process.env.PORT || 1337; | |
if (cluster.isMaster) { | |
// In real life, you'd probably use more than just 2 workers, | |
// and perhaps not put the master and worker in the same file. | |
cluster.fork(); | |
cluster.fork(); | |
cluster.on('disconnect', function(worker) { |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: carbon-cache | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: carbon-cache init script | |
# Description: An init script for Graphite's carbon-cache daemon. | |
### END INIT INFO |
function hexToBase65536(hex) { | |
var result = ""; | |
for (var i = hex.length ; i > 0; i -= 4) { | |
result += String.fromCharCode(parseInt(hex.substring(i - 4, i), 16)); | |
} | |
return result; | |
} |
A small roadmap for the core tech in dat. this mostly relates to the core dependencies such as hypercore/hyperdrive and not the cli or dat.land
Adding var cursor = drive.createByteCursor(file)
. A cursor api that quickly allows you to seek anywhere in the file content.
show_icons() { | |
defaults write com.apple.finder CreateDesktop true | |
killall Finder | |
} | |
hide_icons() { | |
defaults write com.apple.finder CreateDesktop false | |
killall Finder | |
} |