Skip to content

Instantly share code, notes, and snippets.

View ablyler's full-sized avatar

Andy Blyler ablyler

View GitHub Profile
commit 77c607e6348c4cd603ffdd61356b0161d3a15eca
Author: Andy Blyler <andy@blyler.cc>
Date: Wed Aug 21 13:26:02 2013 +0000
add percona-server 5.6 ebuild and required eclass changes
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 0bc083f..9019a15 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@ablyler
ablyler / homebrew.mxcl.nginx.plist
Created February 15, 2013 15:22
/Library/LaunchDaemons/homebrew.mxcl.nginx.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>homebrew.mxcl.nginx</string>
<key>ProgramArguments</key>
<array>
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install https://gist.github.com/raw/88a77381db8fb718bdc0/a2cd80c4ce62a320301443e551566a973cf7fa49/gource.rb
/usr/bin/curl -f#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.8.2) https://gist.github.com/raw/88a77381db8fb718bdc0/a2cd80c4ce62a320301443e551566a973cf7fa49/gource.rb -o /Library/Caches/Homebrew/Formula/gource.rb
######################################################################## 100.0%
==> Downloading http://gource.googlecode.com/files/gource-0.39.tar.gz
Already downloaded: /Library/Caches/Homebrew/gource-0.39.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/gource-0.39.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file configure
Hunk #1 succeeded at 7198 with fuzz 2.
$ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libmacfuse_i32.2.dylib
/usr/local/lib/libmacfuse_i64.2.dylib
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
@ablyler
ablyler / .profile.notams
Created March 21, 2012 20:26
notams for KARB (thanks andyfowler)
alias notams='curl -s "https://pilotweb.nas.faa.gov/PilotWeb/notamRetrievalByICAOAction.do?method=displayByICAOs&formatType=DOMESTIC&retrieveLocId=karb&reportType=RAW&actionType=notamRetrievalByICAOs" | tr -d "\n" | pcregrep -M -o1 -N CRLF -i "<pre>([^<]*)"'
@ablyler
ablyler / gist:2023237
Created March 12, 2012 16:42
mysql-5.5.20 fails due to: libsql.a(sha2.cc.o) has no symbols
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.20.tar.gz
File already downloaded in /Users/ablyler/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ablyler/Library/Caches/Homebrew/mysql-5.5.20.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file scripts/mysqld_safe.sh
patching file scripts/mysql_config.sh
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/
@ablyler
ablyler / mysql-convert-myisam-to-innodb.sh
Created December 21, 2011 23:08
Convert all MyISAM tables in all databases on a server to InnoDB
#!/bin/bash
for t in $(mysql --batch --column-names=false -e "select concat(TABLE_SCHEMA, '.', TABLE_NAME) from INFORMATION_SCHEMA.TABLES where ENGINE = 'MyISAM' and TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA <> 'mysql'" mysql); do
mysql -e "alter table $t type=InnoDB";
done
@ablyler
ablyler / metar-alias.sh
Last active January 23, 2019 23:29
Create alias that outputs the current local METARs for the Ann Arbor, MI Area
alias metar="curl -s https://aviationweather.gov/adds/dataserver_current/httpparam\?dataSource\=metars\&requestType\=retrieve\&format\=xml\&stationString\=karb,kozw,kyip,kdtw,ktol,kttf,klan,koeb,kjxn,kgrr,kphn,kazo,kmui\&hoursBeforeNow\=1\&mostRecentForEachStation\=true | xml2 | grep 'raw_text' | awk -F\\= '{ print \$2 }'"
@ablyler
ablyler / taf-alias.sh
Last active January 23, 2019 23:29
Creates alias that outputs the current local TAFs
alias taf="curl -s https://aviationweather.gov/adds/dataserver_current/httpparam\?dataSource\=tafs\&requestType\=retrieve\&format\=xml\&stationString\=karb,kdtw,kjxn,klan,kozw,kyip,kttf,konz,kdet,ktol,kgrr,kbtl,kmui\&hoursBeforeNow\=1\&mostRecentForEachStation\=true | xml2 | grep 'raw_text' | sed 's/\/response\/data\/TAF\/raw_text\=//' | sort"