Find system naming:
uname # os
uuname -l # short
uname -a # detailed
# checkout remote branch and rename locally | |
git checkout --track -b them-master them/master | |
# push to renamed branch | |
git push them them-master:master | |
# pull from renamed branch | |
git pull them master:them-master |
#!/usr/bin/env node | |
var fs = require('fs'), | |
geoip = require('geoip-lite'), | |
filename = process.argv[2] || 'access.log', | |
byHour = {}; // storage hash | |
console.log('! loading ', filename); | |
fs.readFile(filename, function(error, data) { |
# find what's on port 80 | |
sudo lsof -i :80 |
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
# Checkout remote branch and track (without renaming needs) | |
git fetch origin | |
git checkout --track origin/branchname |
# oops merge went bad! | |
git reset --hard HEAD |
echo "local.random.diceroll 4 `date +%s`" | nc localhost 2003 |
#!/bin/sh | |
find /search/path/ -type f -not -path '*/.git/*' | LANG=C LC_ALL=C LC_CTYPE=C xargs sed -i '' -e 's/before/after/g' |