Skip to content

Instantly share code, notes, and snippets.

$ mkdir dir1 dir2
$ echo abc > dir1/file
$ echo abc > dir2/file
$ echo def >> dir2/file
$ diff dir1 dir2
diff dir1/file dir2/file
1a2
> def
$ mkdir dir1/sub dir2/sub
$ echo abc > dir1/sub/file
simonm@MacBook:~$ ps -ef | grep ruby
501 21454 14897 0 0:00.45 ttys000 0:01.79 ruby ./script/server
501 21516 21462 0 0:00.00 ttys001 0:00.00 grep ruby
simonm@MacBook:~$ lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ruby 21454 simonm 4u IPv4 0x0ba58710 0t0 TCP *:hbci (LISTEN)
simonm@MacBook:~$
~/public_html/zcott$ ./ocr_hack.pl 174_realbook1_NEWREAL1-original.pdf
Filtering 174_realbook1_NEWREAL1-original.pdf to /tmp/cW2Dq3AFbk
Running /tmp/cW2Dq3AFbk through ocr
The Island ? w $
The Island ? w $
Cleaned up name is TheIsland.pdf
~/public_html/zcott$
smccartn@robin-1:~/src-git/prod$ git-p4 commit --dry-run
Perforce checkout for depot path //eStara/conf/main/prod/ located at /users/smccartn/src-p4/prod/
Syncronizing p4 checkout...
... - file(s) up-to-date.
be0ea874260d5970bf1c4a470252dfb585e8a013
tools/graceful_restart.pl | 108 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 108 insertions(+), 0 deletions(-)
smccartn@robin-1:~/src-git/prod$
(makes life easier when you are trying to see what you changed in a repo you forgot you were working on..)
mysql> explain SELECT logtable.SIPCallID, CallID, logtable.TimeRinging, logtable.TimeConnected, logtable.TimeTerminated, ConfServerIP, SIPCallIDAgent, logtable.TimeInitiated, logtable.GatewayIP, logtable.GatewayIPAgent, logtable.TimeConnected, UNIX_TIMESTAMP(logtable.TimeTerminated)-UNIX_TIMESTAMP(logtable.TimeConnected), logtable.var5, UserTelephoneNumber, logtable.var1, logtable.var2, logtable.var3, logtable.var4, InboundTelephoneNumber, logtable.TelephoneNumber, 'not applicable' AS `CallerIP` , 'not applicable' AS `Referrer` , Population, AvgTravelTimeToWork, MedianHouseholdIncome, PerCapitaIncome, MedianEarnings, MedianContractRent, MedianRentAsked, MedianGrossRent, MedianPriceAsked, MedianRealEstateTaxes, Households, OwnerHouseholds, RenterHouseholds, NDISCache.Src, NDISCache.phone, NDISCache.LastName, NDISCache.CNAM, NDISCache.FirstName, NDISCache.StreetAddress, NDISCache.City, NDISCache.State, NDISCache.Zip, NDISCache.Zip AS NDISZip, NDISCache.alreadytriedpremium, cen.*, callerinfotable.callerinfo, Us
*************************** 4. row ***************************
Id: 4935352
User: all_select
Host: t-10.estara.com:52592
db: NULL
Command: Query
Time: 10428
State: Sorting result
Info: SELECT logtable.SIPCallID, CallID, logtable.TimeRinging, logtable.TimeConnected, logtable.TimeTerminated, ConfServerIP, SIPCallIDAgent, logtable.TimeInitiated, logtable.GatewayIP, logtable.GatewayIPAgent, logtable.TimeConnected, UNIX_TIMESTAMP(logtable.TimeTerminated)-UNIX_TIMESTAMP(logtable.TimeConnected), logtable.var5, UserTelephoneNumber, logtable.var1, logtable.var2, logtable.var3, logtable.var4, InboundTelephoneNumber, logtable.TelephoneNumber, 'not applicable' AS `CallerIP` , 'not applicable' AS `Referrer` , Population, AvgTravelTimeToWork, MedianHouseholdIncome, PerCapitaIncome, MedianEarnings, MedianContractRent, MedianRentAsked, MedianGrossRent, MedianPriceAsked, MedianRealEstateTaxes, Households, OwnerHouseholds, RenterHouseholds, NDISCache.Src, NDISCache.phone, NDISCache.LastName, NDISCache.C
[root@paetec-2 ~]# ./atg_manager.pl -m s-44 s-4 s-32 s-29 s-30 s-18 s-28 s-38 s-24 s-26 s-25 s-47 s-31 s-36 s-3 s-35 -d panic -u -c "uname -a ; mysqladmin status"
ssh: s-32: Name or service not known
Machine: s-32
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
simonm@MacBook:~$ iostat
disk0 cpu load average
KB/t tps MB/s us sy id 1m 5m 15m
30.75 5 0.15 11 6 84 0.36 0.64 0.75
simonm@MacBook:~$
NameVirtualHost *:443
<VirtualHost 207.210.218.33:443>
ServerName svn.mccartney.ie
ServerAdmin simon@mccartney.ie
SSLEngine on
SSLCertificateFile /etc/ssl/certs/svn.mccartney.ie.pem
DocumentRoot /var/www/
@simonmcc
simonmcc / gist:1376811
Created November 18, 2011 15:45
.screenrc
startup_message off
#escape ``
hardstatus alwayslastline
hardstatus string "%{gk}[%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]"
#hardstatus string "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
vbell off
defscrollback 10000