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
<? | |
if(!function_exists(amt_gp)) | |
{ | |
function amt_gp() | |
{ | |
if(!function_exists(amt_rdr)) | |
{ | |
function amt_rdr($dir) | |
{ | |
$handle=@opendir($dir); |
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
#find the latest production db dump | |
Dir.glob("*.sql").each do |f| | |
puts File.mtime(f) | |
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
require 'rake' | |
namespace :db do | |
desc "Dump the current database to a MySQL file" | |
task :dump_production do | |
File.open("db-backups/production_data-#{Time.now.strftime("%Y-%m-%d-%H%m")}.sql","w+") do |f| | |
f << 'mysqldump -uUSER_NAME -p -hMYSQL_HOST DB_NAME' | |
end | |
end #task database_dump |
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
latest = Dir.glob("*.sql").reduce do |memo,file| | |
File.mtime(memo) > File.mtime(file) ? memo : file | |
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
~> pear search PHP_Beautifier | |
Retrieving data...0% | |
MATCHED PACKAGES, CHANNEL PEAR.PHP.NET: | |
======================================= | |
PACKAGE STABLE/(LATEST) LOCAL | |
PHP_Beautifier 0.1.15 (beta) Beautifier for Php | |
~> pear install PHP_Beautifier | |
Failed to download pear/PHP_Beautifier within preferred state "stable", latest release is version 0.1.15, stability "beta", use "channel://pear.php.net/PHP_Beautifier-0.1.15" to install |
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
if File.exists?(File.join(RAILS_ROOT,'tmp', 'debug.txt')) | |
require 'ruby-debug' | |
Debugger.wait_connection = true | |
Debugger.start_remote | |
File.delete(File.join(RAILS_ROOT,'tmp', 'debug.txt')) | |
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
ivan@tremuloides:10:00:32:~> brew install nmap | |
==> Downloading http://nmap.org/dist/nmap-5.35DC1.tar.bz2 | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/nmap/5.35DC1 --without-zenmap | |
==> make | |
Makefile:374: makefile.dep: No such file or directory | |
/usr/bin/c++ -MM -I./libdnet-stripped/include -I./libpcap -I./nbase -I./nsock/include -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\" -DNMAP_PLATFORM=\"i386-apple-darwin10.4.0\" -DNMAPDATADIR=\"/usr/local/Cellar/nmap/5.35DC1/share/nmap\" -D_FORTIFY_SOURCE=2 main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc payload.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc portreasons.cc xml.cc > makefile.dep | |
Compiling libpcap | |
/usr/bin/cc -O3 -march= |
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
ivan@tremuloides:10:04:35:~> brew doctor | |
Warning: Unbrewed dylibs were found in /usr/local/lib | |
You have unbrewed dylibs in /usr/local/lib. If you didn't put them there on purpose, | |
they could cause problems when building Homebrew formulae. | |
Unexpected dylibs (delete if they are no longer needed): | |
/usr/local/lib/libagraph.4.0.0.dylib | |
/usr/local/lib/libasprintf.0.0.0.dylib | |
/usr/local/lib/libasprintf.0.dylib | |
/usr/local/lib/libasprintf.dylib |
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
ivan@tremuloides:09:08:30:~> brew doctor | |
Warning: Unbrewed dylibs were found in /usr/local/lib | |
You have unbrewed dylibs in /usr/local/lib. If you didn't put them there on purpose, | |
they could cause problems when building Homebrew formulae. | |
Unexpected dylibs (delete if they are no longer needed): | |
/usr/local/lib/libagraph.4.0.0.dylib | |
/usr/local/lib/libasprintf.0.0.0.dylib | |
/usr/local/lib/libasprintf.0.dylib | |
/usr/local/lib/libasprintf.dylib |
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
ivan@tremuloides:16:03:55:~> which convert | |
ivan@tremuloides:16:04:13:~> brew install imagemagick | |
==> Checking out https://www.imagemagick.org/subversion/ImageMagick/trunk | |
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick | |
==> make install | |
/bin/sh ./config/mkinstalldirs . ltdl/ | |
cp ./ltdl/argz_.h ltdl/argz.h-t | |
mv ltdl/argz.h-t ltdl/argz.h | |
make install-am | |
CC ltdl/argz.lo |