Since Mavericks stopped using the deprecated ipfw
(as of Mountain Lion), we'll be using pf
to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file>
with your redirection rule like:
/* | |
jQuery.extend extracted from the jQuery source & optimised for NodeJS | |
Twitter: @FGRibreau / fgribreau.com | |
Usage: | |
var Extend = require('./Extend'); | |
// Extend | |
var obj = Extend({opt1:true, opt2:true}, {opt1:false}); |
module HttpAuthentication | |
module Basic | |
def authenticate_or_request_with_http_basic(realm = 'Application') | |
authenticate_with_http_basic || request_http_basic_authentication(realm) | |
end | |
def authenticate_with_http_basic | |
if auth_str = request.env['HTTP_AUTHORIZATION'] | |
return 'login:password' == ActiveSupport::Base64.decode64(auth_str.sub(/^Basic\s+/, '')) | |
end |
#!/bin/bash | |
# Script to convert PDF file to JPG images | |
# | |
# Dependencies: | |
# * pdftk | |
# * imagemagick | |
PDF=$1 |
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.
ejabberd is designed to be a rock-solid and feature rich XMPP server.
ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.
package divo.felix.chem.pte; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Holds information of the periodic table of elements. | |
* | |
* @author Felix Divo | |
*/ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Basic Requirements: | |
Computer with wired and wireless connection | |
FFmpeg installation: http://www.ffmpeg.org/ | |
GoPro Hero 3+: http://gopro.com/ | |
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point | |
Overview: | |
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor. |
from twisted.web import server, resource | |
from twisted.internet import reactor, endpoints | |
class Counter(resource.Resource): | |
isLeaf = True | |
numberRequests = 0 | |
def render_GET(self, request): | |
self.numberRequests += 1 | |
request.setHeader("content-type", "text/plain") |