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:
sudo amazon-linux-extras install epel -y | |
sudo yum install stress -y |
#!/bin/sh | |
# | |
# Converts branch name 'MAPP-452_how-is-it-going' into a commit message 'MAPP-452 How is it going' | |
# | |
if ! [ -z $2 ] | |
then | |
if ! [ "message" == $2 ] | |
then |
import Data.List | |
-- Transform cells into next iteration | |
nextTurn :: (Integral a) => [(a,a)] -> [(a,a)] | |
nextTurn space = [(x, y) | (x,y,_) <- [head xs | xs <- cells space, length xs == 3 || (length xs == 4 && True `elem` ([x | (_,_,x) <- xs]))]] | |
-- Cells grouped by their coordinates | |
cells :: (Integral a) => [(a,a)] -> [[(a,a,Bool)]] | |
cells space = groupBy (\(x1,y1,_) (x2,y2,_) -> x1 == x2 && y1 == y2) (sort (neighbourhood space)) |
all: calc | |
calc: parser lexer | |
CC lexer.c parser.c -o calc | |
lexer: | |
flex -o lexer.c lexer.l | |
parser: | |
bison -d -o parser.c parser.y |
function asyncForeach(array, fn, callback) { | |
var completed = 0; | |
var arrayLength = array.length; | |
if(arrayLength === 0) { | |
callback(); | |
} | |
for(var i = 0; i < arrayLength; i++) { | |
fn(array[i], i, function() { | |
completed++; | |
if(completed === arrayLength) { |
#!/usr/bin/env bash | |
source super.bash | |
foo() { | |
echo hello | |
} | |
super_function foo | |
foo() { |
package org.test; | |
import java.io.File; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.Locale; | |
import java.util.MissingResourceException; | |
import java.util.ResourceBundle; |
#!/usr/bin/env python | |
# Looking for MP4 videos in infoq content. | |
# | |
# <div style="width: 320px; height: 265px; float: left; margin-right: 10px;"> | |
# <video poster="/styles/i/logo_scrubber.png" id="video" controls="controls" width="320" height="265"> | |
# <source src="http://d1snlc0orfrhj.cloudfront.net/presentations/12-mar-lockfreealgorithms.mp4" /> | |
# </video> | |
# </div> |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: