A basic example of layering: FTP < TCP < IP < Ethernet
Benefis of layering:
- You can understand a layer without knowing much about the others.
- Minimize dependencies.
function gco | |
set branch (git for-each-ref | sed -E 's/[a-zA-Z0-9]*[[:space:]]commit[[:space:]]refs\/(heads|remotes\/origin)\///g' | grep $argv[1] | head -n1) | |
if [ "$branch" = "" ] | |
echo 'Branch not found'; | |
else | |
git checkout $branch; | |
git pull origin $branch; | |
end | |
end |
# Prefix commit message with "Refs #[PULL_NUMBER] - " | |
# PULL_NUMBER is derived from the branch name, which is assumed to be in one of the following formats: | |
# something/[PULL_NUMBER]-short-descriptive-name | |
# something/[GROUP_NUMBER]/[PULL_NUMBER]-short-descriptive-name | |
function commit | |
set issue (git rev-parse --abbrev-ref HEAD | cut -d / -f 3 | cut -d - -f 1 | grep "^\d*\$") | |
set message $argv[1] | |
set prefix "Refs #" |
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require('react'); | |
module.exports = React.createClass({ | |
displayName : 'Name', | |
render : function() | |
{ |
function pushbranch | |
set branch (git rev-parse --abbrev-ref HEAD) | |
git push -u origin $branch | |
end |
function mkpull | |
set owner (git remote -v | grep git@github.com | head -n1 | awk '{print $2}' | sed 's/.*://' | sed 's/\/.*//') | |
set repo (git remote -v | grep git@github.com | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//') | |
set head (git rev-parse --abbrev-ref HEAD) | |
if set -q argv[1] | |
set base $argv[1] | |
else | |
set base "develop" | |
end |
<?php | |
namespace Test\; | |
use PHPUnit_Framework_TestCase; | |
class Test extends PHPUnit_Framework_TestCase | |
{ | |
public function setUp() | |
{ |
python -m SimpleHTTPServer
php -S