This file contains hidden or 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
# Script for dumping exchange database to .pst files. | |
# Globals | |
$Now = Get-Date | |
$Days = "7" | |
$TargetFolder = "C:\Users\jtrout\" | |
$LastWrite = $Now.AddDays(-$days) | |
$Files = get-childitem $TargetFolder -include *.pst -recurse | Where {$_.LastWriteTime -le "$LastWrite"} |
This file contains hidden or 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
set number | |
set shiftwidth=4 | |
set tabstop=4 | |
syntax on | |
set smartindent | |
" Tab key mappings | |
nmap th :tabprev<cr> | |
nmap tl :tabnext<cr> | |
nmap tn :tabnew<cr> |
This file contains hidden or 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
# cd /usr | |
# cvs -qd [email protected]:/cvs get -rOPENBSD_4_5 -P src |
This file contains hidden or 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
export PKG_PATH=http://openbsd.berkeley.edu/pub/OpenBSD/4.4/packages/i386/ |
This file contains hidden or 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
# Painless method for rendering a 404 (not found) whenever it might be useful | |
def render_404 | |
respond_to do |format| | |
format.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => :not_found } | |
format.xml { head :not_found } | |
end | |
end |
This file contains hidden or 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/php | |
<? | |
$api_key = "xxxx"; | |
$url = "xxxx"; | |
foreach( glob("*.xml") as $filename) | |
{ | |
$cmd = "curl -u $api_key:X -H 'Content-type: application/xml' -d \@$filename $url"; | |
$result = `$cmd`; |
This file contains hidden or 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
/etc/options | |
#debug | |
proxyarp | |
#+MSChap-V2 mppe-128 mppe-stateless | |
##require-mschap-v2 | |
##require-mppe-128 | |
ms-dns 192.168.100.1 | |
/etc/options.pptpd | |
# Authentication |
This file contains hidden or 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
[~/.ssh]$ cat id_dsa.pub | pbcopy |
This file contains hidden or 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 authenticate | |
authenticate_or_request_with_http_basic do |username, password| | |
username == "joe" && password == "secret" | |
end | |
end |
This file contains hidden or 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
# Doesn't work | |
<p> | |
<% case @request.author_hosted %> | |
<% when "yes" %> | |
The school <b>has</b> hosted an author before. | |
<% when "no" %> | |
The school <b>has not</b> hosted an author before. | |
<% end %> | |
</p> |