This file contains 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 | |
# PROVIDE: www | |
# REQUIRE: LOGIN FILESYSTEMS | |
# KEYWORD: shutdown | |
. /etc/rc.subr | |
name="www" | |
rcvar="${name}_enable" |
This file contains 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
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>Amazon.com</ShortName> | |
<Description>Amazon.com Search</Description> | |
<InputEncoding>ISO-8859-1</InputEncoding> | |
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAAAAAAAAC0AQAAJgAAACAgAAAAAAAA6QIAANoBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAF7SURBVDjLlZPLasJAFIaFRF+iVV+h6hO0GF+gVB9AaHwDt64qCG03tQgtdCFIuyhUelmGli66MXThSt24kNiFBUlAYi6ezjnNxSuawB/ITP7v/HNmJgQAEaZzpgHs/gwcTyTEXuXl2U6nA8ViEbK5HKler28CVRAwnB9ptVrAh8MrQuCaZ4iA8fzIqSgCxwzpTIaSuN/RWGwdYLwCUBQFZFkGSZLgqdmEE7YEN8VOAKyaSKUW4nNBAFmnYiKZpDRX1WqwBBzP089n5f/NEQsFL4WqqtsBWJlzDAJr5PwSMM1awEzzdxIbGI3Hvc6jCZeVFgRQRwpY7Qcw3ktgfpR8wLRxCPaot/X4GS95MppfF6DX9n2A3f+kAZycaT8bAZjU6r6B/duD6d3BYg9wQq/tkYzHY1blEiz5lmQyGc95mrO6r2CxgpjCBXgNsJVviolpXJiraeOIjJRE10juUa4sR8V+mO17VvmGqtuOcdNlwut8zTQJcJ0njifyB2bgTdKh6w4BAAAAAElFTkSuQmCCiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACsElEQVRYw71XQWsTURBe2LQgeNKLB+tVemt6txcteNSD/QGC6VEIGDx5s+eKPQqFgJhLNdFLBWMP7cU0oSAWjB70koC9WHbVQ5SO8 |
This file contains 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 | |
## | |
## Git command line tool for quickly jumping to a project's web page or issue list. | |
## Inspired by https://github.com/github/hub | |
## Save file as git-browse somewhere on your path. | |
print_help() { | |
echo "Usage: git browse [options]" | |
echo " -i, --issues Navigate to the project's issue page." | |
} |
This file contains 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 phantomjs | |
/** | |
* Scrapes a Coursera class index page and downloads the | |
* individual lecture mp4s. Requires phantomjs and curl. | |
* Usage: ./coursera-slurp [index-url] | |
* | |
* If something breaks, it's probably the DOM selector in the | |
* remote page. Try fiddling with the 'linkSelector' function. | |
*/ | |
var page = require('webpage').create(), |
This file contains 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
# Finish headless installation via `ssh [email protected]` | |
# See /boot/config.txt | |
sudo apt-get update && sudo apt-get --purge dist-upgrade | |
sudo raspi-config | |
# Add locale en.us-utf8 (but keep en.gb-utf8) | |
sudo dpkg-reconfigure locales | |
# Timezone | |
sudo dpkg-reconfigure tzdata | |
# Update firmware |
This file contains 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
<!-- DuckDuckGo HTTPS search using Startpage suggestions. | |
- Url params: https://duckduckgo.com/params | |
- OSX location: Firefox.app/Contents/MacOS/browser/searchplugins | |
- In about:config, browser.search.defaultenginename = DuckDuckGo --> | |
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>DuckDuckGo</ShortName> | |
<Description>DuckDuckGo Search</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Image width="16" height="16">https://duckduckgo.com/favicon.ico</Image> |
This file contains 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
/* Parse a string function definition and return a function object. Does not use eval. | |
* @param {string} str | |
* @return {function} | |
* | |
* Example: | |
* var f = function (x, y) { return x * y; }; | |
* var g = parseFunction(f.toString()); | |
* g(33, 3); //=> 99 | |
*/ | |
function parseFunction (str) { |
This file contains 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 | |
# Convenience wrapper around VBoxManage for controlling VirtualBox virtual machines. | |
# | |
# Headless Ubuntu server gets stuck at boot menu on unsuccessful boots: | |
# http://serverfault.com/questions/243343/headless-ubuntu-server-machine-sometimes-stuck-at-grub-menu | |
function print_help { | |
echo "Usage: $(basename $0) [options] name" | |
echo "Easy control of VirtualBox virtual machines." | |
echo " -h Show this usage guide." |
This file contains 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 | |
## | |
## Parse metadata variables from a markdown file. | |
## | |
## The key-values are returned as field-deliminated lines to | |
## stdout, or, as a variable string that can be passed to pandoc | |
## as command-line parameters. | |
## | |
## Delcare metadata in the markdown file using the format: | |
## % meta keyname1="value1" |
This file contains 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 | |
##Formats a Google contacts list for use in a Pine address book. | |
##Requires the Google Command Line Tool: http://code.google.com/p/googlecl/ | |
##Usage: | |
## contacts-to-addressbook > $HOME/.addressbook | |
GOOGLECL=$(which google) | |
if [ ! -x "$GOOGLECL" ]; then | |
echo "Error: Requires the Google command line tool." | |
exit 1 |
NewerOlder