Skip to content

Instantly share code, notes, and snippets.

/* Allow for border-to-border line highlighting */
pre {
display: block;
padding: 0 0 0 0;
}
pre code {
display: block;
margin: 15px 0 15px 20px;
}
.highlight span.emphasize {
@dbbrian
dbbrian / shastring
Created June 29, 2015 14:29
Simple bash script that print the SHA* of the given string, defaults to SHA1
#!/bin/bash
#
# Print the SHA* of the given string, defaults to SHA1
#
# $method, $string
print_digest()
{
echo -n "$2" | openssl dgst "$1" | cut -f 1 -d " "
@dbbrian
dbbrian / dash
Created September 14, 2015 13:43
#!/bin/bash
#
# Calling Dash from bash
#
# Usage:
#
# $ dash something # Search for “something” in the Man Pages docset
# $ dash docset something # Search for “something” in the passed docset
#
#!/bin/bash
#
# [Create and] open a file in Byword from bash
#
# Usage:
#
# $ byword a-file
#

Keybase proof

I hereby claim:

  • I am dbbrian on github.
  • I am dbbrian (https://keybase.io/dbbrian) on keybase.
  • I have a public key ASBhFewukU_GXAwxg1f-ma7wez5EfX1shIB6iCs_flzomwo

To claim this, I am signing this object: