I hereby claim:
- I am settermjd on github.
- I am settermjd (https://keybase.io/settermjd) on keybase.
- I have a public key ASAL6A3SHjLSE8X0cePFas3u7nE7xwlxHc4mxwkFNNj2ugo
To claim this, I am signing this object:
<?php | |
// other setup code... | |
$select | |
->where([ | |
'id = ?' => $userId | |
]) | |
->join( | |
['r' => 'tblroles'], |
#!/bin/bash | |
# Inspired by http://www.devthought.com/code/create-a-github-pull-request-from-the-terminal/ | |
targetbranch=master | |
if test "$1"; then | |
targetbranch=$1 | |
fi | |
repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"` |
#!/bin/bash | |
set -e | |
# Script to backport a PR to branch | |
# ./backport-pr.sh backportTo backportFrom prId | |
# This script requires two other tools: | |
# - github-api-tools | |
# - git-backport | |
# add your GitHub credentials |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
if (( $# != 1 )) | |
then | |
echo "Not enough arguments supplied." | |
echo " usage: git-delete-branches <branch pattern to search on>" | |
exit | |
fi | |
BRANCH_PATTERN=$1 |
# Simple function to search the ownCloud docs for a text string | |
function search_docs() { | |
if (( $# == 0 )); then | |
echo "Not enough arguments supplied." | |
echo " usage: search_docs <string to find>" | |
return -1; | |
fi | |
echo "Searching ownCloud documentation for: '$1'" | |
grep -rin "$1" $DOCS_HOME/*_manual/ --include="*rst" |
#!/bin/bash | |
set -e | |
# Set the width from the first argument (could do this with getopts). | |
width=$1 | |
# Filter the images using a combination of file and awk. | |
file images/* | awk -v width="$width" '{ if ($5 > width) print $1 }' | tr -d ':' |
#!/bin/bash | |
$username=<your username> | |
$password=<your password> | |
$owner=<repository owner> | |
$repo=<repository> | |
$pull_request_id=<pull request id to filter by> | |
curl --silent -u $username:$password https://api.github.com/repos/$owner/$repo/pulls/$pull_request_id/commits \ | |
| jq --raw-output '.[].sha' | tr '\r\n' ' ' |
This is a cheatsheet with little bits and pieces that I've picked up along with way in VIM. I hope that you find it helpful.
Split each sentences in a paragraph onto a newline. It only does a simplistic determination of a sentence, that being a full-stop, followed by a space and a capital letter.
:'<,'>s/\. \(\u\)/.\r\1/g
git log --format=%h stable10..master | (head -n1 && tail -n1) | xargs -n 2 | awk '{ print $1".."$2 }' |