Skip to content

Instantly share code, notes, and snippets.

View solarce's full-sized avatar

Brandon Burton solarce

View GitHub Profile
<VirtualHost *:80>
DocumentRoot /home/screenplayuploads
ServerName oscars-ftp.ristech.net
ServerAlias oscars-ftp01.ristechinc.net oscars-ftp01.ristech.net
ErrorLog logs/oscars-ftp.ristech.net-error_log
CustomLog logs/oscars-ftp.ristech.net-access_log common
<Directory "/home/screenplayuploads">
Options +Indexes
AllowOverride All
@solarce
solarce / mar_sync
Created February 12, 2009 17:33 — forked from anonymous/mar_sync
#!/bin/sh
# rbackup.sh -- secure backup to a remote machine using rsync.
# Directories to backup. Separate with a space. Exclude trailing slash!
SOURCES="/"
# IP or FQDN of Remote Machine
RMACHINE=192.168.26.100
# Remote username
#!/Bin/bash
###### VARIABLES FOR CONFIG ############
STORSERVER=karate-kid
SERVER=ris-xen-prod04
BASE=/home/xen
TEMPLATE=nrs-prod-webtemplate
VM=$1
VMIP=$2
TEMPLATEDISKNAME=sdb
import os
lines = open('/tmp/foo').read().splitlines()
for line in lines:
print line
Doogsauumauipnt >)! Zov qatsfd!ovr!ieipt!fjlues >) Wiau brf zovr!
tirfe!fbvprjtf uedhoidam copkt? Pmebsf jndlvdf bt!lfatt!ooe!spfuwbrf
fnhioefrjnh copk- uhf ptiess!cbn!bf xhbtfvfr- j.f.- qhzsjct,!mbti,!euc/
-(bburton@andesite)-(~)- for i in {1..10}; do echo $i; done
1
2
3
4
5
6
7
8
9
echo off
rem %1 - path %2- mask %3 - archive name %4 - days old
if "%~1"=="" goto usage
if "%~3"=="" goto usage
forfiles /p "%~1" /m "%~2" /d -%~4 /c "cmd /c echo @file @fdate @ftime & 7za a %~3.7z @file && del /f /q @file"
goto quit
:usage
echo pack all files in path %%1 by mask %%2 with %%4 days old
echo to archive %%3.zip (for dated archive name use %%date:~8,2%%%%date:~3,2%%%%date:~0,2%%)
:quit
>>> foo = 'blah'
>>> type(foo)
<type 'str'>
>>> if type(foo) == 'str':
... print foo
...
>>> if type(foo) == str:
... print foo
...
blah
-(bburton@andesite)-(~)- host www.latingrammy.com
latingrammy.com has DNAME record www.latingrammy.com.
www.latingrammy.com is an alias for www.www.latingrammy.com.
www.www.latingrammy.com is an alias for www.www.www.latingrammy.com.
www.www.www.latingrammy.com is an alias for www.www.www.www.latingrammy.com.
www.www.www.www.latingrammy.com is an alias for www.www.www.www.www.latingrammy.com.
www.www.www.www.www.latingrammy.com is an alias for www.www.www.www.www.www.latingrammy.com.
www.www.www.www.www.www.latingrammy.com is an alias for www.www.www.www.www.www.www.latingrammy.com.
www.www.www.www.www.www.www.latingrammy.com is an alias for www.www.www.www.www.www.www.www.latingrammy.com.
www.www.www.www.www.www.www.www.latingrammy.com is an alias for www.www.www.www.www.www.www.www.www.latingrammy.com.
@solarce
solarce / LogIt.scpt
Created September 3, 2009 22:57 — forked from sippey/LogIt.scpt
using terms from application "Quicksilver"
on process text log_text
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'")
set theText to log_text
set theText to theDate & " " & theText & "
"
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string
set theFilePath to POSIX file thePosixFilePath
set theFileReference to open for access theFilePath with write permission
write theText to theFileReference starting at eof