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/bash | |
# | |
# Connects to the VPN specified by the given vpnc(1) configuration file and | |
# then waits for you to interrupt or kill this process, at which time it | |
# disconnects the VPN. See https://github.com/dnschneid/crouton/wiki/VPNC | |
# | |
# Usage: chromeos-vpn VPNC_CONFIGURATION_FILE [OPTIONS_FOR_VPNC...] | |
# | |
# Setup: apt-get install vpnc wireless-tools | |
# |
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 | |
ARGS=$( echo "$*" | sed 's/ -url / -host /; s/ -langselen\>//' ) | |
$HOME/.cisco/hostscan/bin/cstub -log error $ARGS |
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 ruby | |
# | |
# Usage: ruby sjsu-course-prereqs.rb [PROGRAM_INFO_URL] | |
# | |
# Dumps course prerequisites for the given SJSU degree program as a DOT graph. | |
# If no PROGRAM_INFO_URL is given, the M.S. Computer Science program is used: | |
# | |
# http://www.sjsu.edu/cs/programs/mscs/program-info/ | |
# | |
# You can convert the graph into a PDF with clickable course links like this: |
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
calling function fetch#visual(1) | |
line 1: " get text between last visual selection marks | |
line 2: " adapted from http://stackoverflow.com/a/6271254/990363 | |
line 3: let [l:startline, l:startcol] = getpos("'<")[1:2] | |
line 4: let [l:endline, l:endcol] = getpos("'>")[1:2] | |
line 5: let l:endcol = min([l:endcol, col([l:endline, '$'])]) " 'V' col nr. bug | |
line 6: let l:endcol -= &selection is 'inclusive' ? 0 : 1 | |
line 7: let l:lines = getline(l:startline, l:endline) | |
line 8: if visualmode() isnot? 'v' " block-wise selection |
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
<!-- This Source Code Form is subject to the terms of the Mozilla Public | |
- License, v. 2.0. If a copy of the MPL was not distributed with this | |
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Untitled</title> |
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
! The Desert color scheme, ported to PuTTY from Vim by igvita: | |
! http://www.igvita.com/2008/04/14/custom-putty-color-themes/ | |
XTerm*vt100.foreground : rgb:ff/ff/ff | |
XTerm*vt100.background : rgb:33/33/33 | |
XTerm*vt100.cursorColor : rgb:00/ff/00 | |
XTerm*vt100.color0 : rgb:4d/4d/4d | |
XTerm*vt100.color1 : rgb:55/55/55 | |
XTerm*vt100.color2 : rgb:ff/2b/2b | |
XTerm*vt100.color3 : rgb:ff/55/55 | |
XTerm*vt100.color4 : rgb:98/fb/98 |
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
require 'ember' | |
module ActionView | |
module TemplateHandlers | |
## | |
# @example Pass template processing options to Ember | |
# | |
# ActionView::TemplateHandlers::Ember.options = { | |
# :unindent => true, | |
# :shorthand => true, |
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
def quoted_date(value) | |
base = value.respond_to?(:getutc) ? value.getutc.to_s(:db) : super | |
usec = sprintf(".%06d", value.usec) if value.respond_to?(:usec) | |
zone = " #{value.formatted_offset}" if value.respond_to?(:formatted_offset) | |
"#{base}#{usec}#{zone}" | |
end |
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 ruby | |
# This script emulates [Spin] using [TestR]. | |
# | |
# Usage: testr-spin serve [-I<LOAD_PATH>]... <OVERHEAD_FILE>... | |
# Usage: testr-spin push <TEST_FILE> [<TEST_NAME>]... | |
# | |
# [Spin]: https://github.com/jstorimer/spin | |
# [TestR]: https://github.com/sunaku/testr | |
require 'json' |
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
def self.valid_time?(time) | |
(0 .. 2359).include? Integer(time) | |
rescue ArgumentError # invalid integer | |
false | |
end |
OlderNewer