2015-10-21
- jennifer
- martym
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
(function(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
#!/bin/sh | |
# Usage: agile.sh "some task name" | |
APIKEY=your_api_key | |
curl http://tasks.jaderobbins.com/tasks?user_credentials=$APIKEY --data-urlencode "task[name]=$1" |
require 'open-uri' | |
require 'rubygems' | |
require 'json' | |
# Change these settings | |
hostname = 'home.hostname.com' # the hostname you use to connect to home ip | |
apikey = 'your-dreamhost-api-key' # a dreamhost api key that has access to all dns functions | |
# method to generate a unique_id | |
# TODO: use uuid instead |
" hashrocket.vim | |
" vim:set ft=vim et tw=78 sw=2: | |
if $HASHROCKET_DIR == '' && expand('<sfile>') =~# '/ops/hashrocket\.vim$' | |
let $HASHROCKET_DIR = expand('<sfile>')[0 : -20] | |
endif | |
if $HASHROCKET_DIR == '' && filereadable(expand('~/.bashrc')) | |
let $HASHROCKET_DIR = expand(matchstr("\n".join(readfile(expand('~/.bashrc')),"\n")."\n",'\n\%(export\)\=\s*HASHROCKET_DIR="\=\zs.\{-\}\ze"\=\n')) | |
endif | |
if $HASHROCKET_DIR == '' |
# Dev/Apps Capistrano Deployment Script | |
# Copyright (c) 2009 Montana State University | |
# | |
# Version: 0.3 | |
# | |
# FILE: deploy.mysql.rb | |
# This deployment file will allow a user to deploy their application | |
# code to dev.msu.montana.edu | |
# | |
# PREREQUISITES |
# Azure Hourly Error | |
from Cron Daemon <[email protected]> | |
to [email protected] | |
date Tue, Jul 21, 2009 at 4:00 PM | |
subject Cron <root@azure> /root/scripts/rsnapshot-with-remount hourly | |
/bin/cp: will not create hard link `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' to directory `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' | |
---------------------------------------------------------------------------- | |
rsnapshot encountered an error! The program was invoked with these options: | |
/usr/bin/rsnapshot hourly | |
---------------------------------------------------------------------------- |