Homebrew people have since included this in a recipe.
$ brew update
$ brew install mongodb
( follow the instructions given )
# This LOOKS pretty straightforward, but it took awhile to sort out issues with | |
# py2cairo and pygobject, so I hope I've saved you some time :-) | |
# | |
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow | |
# -- see https://gist.github.com/771394 if you need advice on getting there. | |
# There are some optional dependencies omitted, so if you're going to be doing | |
# heavy development with these libs, you may want to look into them. | |
# | |
# We go to some configure option pains to avoid polluting the system-level | |
# Python, and `brew link`ing Cairo which is keg-only by default. |
©2012 Viktor Klang | |
object Actor { | |
object Ops { // Actor Behavior results | |
sealed trait Op | |
case object Stay extends Op | |
case class Become(b: Any => Op) extends Op | |
case object Die extends Become( // Mandatory for this all to work, but it's convenient | |
msg => { println("Dropping msg [" + msg + "]for " + this + " due to severe case of death."); Stay } // Stay Dead plz |
require 'sinatra' | |
require 'redis' | |
require 'json' | |
require 'date' | |
class String | |
def &(str) | |
result = '' | |
result.force_encoding("BINARY") |
[merge] | |
keepBackup = false | |
tool = custom | |
[mergetool "custom"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false |
Function.prototype.runOnBackgroundThread = function (aCallback) { | |
var _blob = new Blob(['onmessage = '+this.toString()],{"type":"text/javascript"}); | |
var _worker = new Worker((webkitURL.createObjectURL || URL.createObjectURL)(_blob)); | |
_worker.onmessage = aCallback; | |
_worker.postMessage(); | |
} | |
var _test = function () { | |
postMessage((1+1).toString()); | |
} |
There are four different ways one can deploy a webapp to Tomcat. If TCHOME is the Tomcat top-level directory: | |
* Copy the war file foo.war or exploded war directory to TCHOME/webapps | |
* Create a context file context.xml in the webapp’s META-INF/ directory that contains a <Context> fragment that describes the webapp deployment | |
* Add a <Context> element to the <Host> element in Tomcat’s server.xml that describes the webapp deployment, including docBase. docBase is a <Context> attribute that locates the war file or exploded war directory in the filesystem. | |
* Create a context file foo.xml in TCHOME/conf/Catalina/localhost/foo.xml that contains a <Context> fragment that describes the webapp deployment, including docBase. | |
The first two methods do not provide the freedom to name the servlet context independent of file system names for the war file or exploded war directory, whereas the last two do. Of the two methods that provide control over context naming, the most appealing is the use of a context file foo.xml p |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Starter Template</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- styles --> |
[sendemail]
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = <gmail email address>
from = <email address for From: field>
#!/bin/bash -ex | |
# Set some local variables | |
PRIVATE_IP=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4` | |
PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4` | |
VPN_DNSHOST=`grep -o "nameserver.*" /etc/resolv.conf | awk '{print $2}'` | |
yum install -y libreswan ppp xl2tpd | |
# Setup IPSEC Tunnel |