Skip to content

Instantly share code, notes, and snippets.

Avatar

Casper Hollingberry hollingberry

View GitHub Profile
View swatches.html
<title>Swatches</title>
<input placeholder="#fff" onchange="document.body.style.background=this.value">
View animal_systems
Animal Systems Unit Objectives
Chapter 40: Animal Form and Function
1. Animal exchange of nutrients and gases occurs as substances dissolved in an
aqueous medium move across the plasma membrane of each cell. Rate of exchange
is proportional to surface area; the amount of material that must be
exchanged is proportional to volume. For this reason, animals try to maximize
the surface area to volume ratio of their exchange surfaces. Once absorbed,
circulatory fluids can carry the materials around the body.
View shakespeare.sh
#!/bin/sh
# shakespeare - print a list of Shakespeare's plays sorted by word count
curl -s http://shakespeare.mit.edu/index.html |
grep "<a" |
grep -v em |
egrep -o 'href="[a-z_]+' |
sed 's/href="//' |
while read play
do
View ruby2go.awk
function capitalize(s) {
if (s == "id") {
return "ID"
} else {
return toupper(substr(s, 1, 1)) substr(s, 2, length(s) - 1)
}
}
function ruby2go(s) {
if (s == "String") { return "string" }
View field
#!/bin/sh
# field - print numbered fields
if test [ -z stripnumeric $0 ]
then
delim=$0
shift
else
delim=[ \t]+
fi
View creamery.ly
\header {
title = "The Old Creamery Building"
tagline = ""
}
upper = \relative c' {
\clef treble
\key c \minor
\time 2/4
\tempo 4 = 96-112
View hsuusers.sh
#!/bin/sh
for line in `cat /dev/stdin | head -n -18 | tail -n +3`
do
# Create URL
url=http://users.humboldt.edu/$line/
# Get HTTP status
status=`curl -sIL $url | head -1 | awk '{print $2}'`
@hollingberry
hollingberry / .vimrc
Created Aug 13, 2015
Don't deselect when indenting in vim
View .vimrc
vnoremap > ><CR>gvll
vnoremap < <<CR>gvhh
View receivers.go
package main
import (
"fmt"
)
type Banana struct {
msg string
}
View xml.go
package main
import (
"encoding/xml"
"fmt"
"io"
"strings"
)
type Student struct {