This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adds a bash function that grabs a password from the MacOS keychain. | |
# Usage: | |
# getFromKeychain <entryname> | |
getFromKeychain() { | |
echo $(security find-generic-password -ga "$1" 2>&1 >/dev/null | awk '/^password/{ print substr($2, 2, length($2) - 2) }') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Does a fetch --prune of all repositories and lists all open pull requests | |
# | |
# Usage: | |
# `hello <github org>` | |
# | |
# Prep steps: | |
# 1) Ensure your git clones are in a subdirectory that matches your github org name | |
# 2) install jq from https://stedolan.github.io/jq/ (brew install jq) | |
# 3a) Create a GitHub Personal OAuth token on https://github.com/settings/tokens/new (with "repo" access) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# A hook script to check the commit log message. Called by "git commit" with | |
# one argument, the name of the file that has the commit message. The hook | |
# should exit with non-zero status after issuing an appropriate message if it | |
# wants to stop the commit. The hook is allowed to edit the commit message | |
# file. | |
# | |
test "" = "$(cat $1 | head -n1 | egrep -v '^[A-Z]+-[0-9]+\b')" || { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In buildSrc/src/main/groovy/ | |
import org.eclipse.jgit.api.Git | |
import org.eclipse.jgit.lib.RepositoryBuilder | |
import org.gradle.api.Project | |
class GitFunctions { | |
public static String headCommitAndStatus(Project project) { | |
def repo = new RepositoryBuilder() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disables automatic substitution of "" by “” | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | |
# Disables automatic subsitution of -- by – | |
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"disable_existing_loggers": true, | |
"filters": { | |
"my_filter": { | |
"()": "filters.MyFilter" | |
} | |
}, | |
"formatters": { | |
"debug": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"disable_existing_loggers": true, | |
"formatters": { | |
"debug": { | |
"format": "[%(levelname)s][%(asctime)s](%(funcName)s/%(lineno)d) %(message)s", | |
"datefmt": "%Y-%m-%d %H:%M:%S" | |
}, | |
"simple": { | |
"format": "[%(levelname)s][%(asctime)s] %(message)s", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import android.os.Bundle; | |
import android.view.KeyEvent; | |
import android.view.inputmethod.CompletionInfo; | |
import android.view.inputmethod.CorrectionInfo; | |
import android.view.inputmethod.ExtractedText; | |
import android.view.inputmethod.ExtractedTextRequest; | |
import android.view.inputmethod.InputConnection; | |
import android.view.inputmethod.InputConnectionWrapper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sony camera emits GPS data in NMEA format [1] | |
# | |
# The $GPRMC records contain velocity | |
# | |
# $GPRMC,043151.097,A,5203.5674,N,513.4071,E,14.56,,010814,,,A*43 | |
# ^ ^ ^ ^ ^ ^ ^ | |
# | | | | | | \-Checksum | |
# | | | | | | | |
# | | | | | \- date, ddmmyy | |
# | | | | \-------- velocity in knots |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Processes Ant JUnit logging output into tab separated values. | |
# | |
# [junit] Running com.myapp.MyTest | |
# [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.721 sec | |
# | |
# Suite Num tests Num failed Num error Time (s) | |
# com.myapp.MyTest 2 0 0 0.721 | |
# | |
BEGIN { | |
testname="" |