Skip to content

Instantly share code, notes, and snippets.

View swsnider's full-sized avatar

Silas Snider swsnider

View GitHub Profile
@swsnider
swsnider / keybase.md
Created February 6, 2016 02:04
Keybase proof

Keybase proof

I hereby claim:

  • I am swsnider on github.
  • I am swsnider (https://keybase.io/swsnider) on keybase.
  • I have a public key whose fingerprint is FAEC CD1E B323 8238 DE02 D76E 472D 0236 2BE8 1AB2

To claim this, I am signing this object:

@swsnider
swsnider / gist:6738113
Created September 28, 2013 03:41
running brew install -v mariadb 2>&1 and brew install --env=std -v mariadb 2>&1 output.
swsnider@Silass-MacBook-Pro : ~
[0] % brew install -v mariadb 2>&1
==> Downloading http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.32/kvm-tarbake-jaunty-x86/mariadb-5.5.32.tar.gz
Already downloaded: /Library/Caches/Homebrew/mariadb-5.5.32.tar.gz
tar xf /Library/Caches/Homebrew/mariadb-5.5.32.tar.gz
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/5.5.32 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mariadb/5.5.32/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mariadb/5.5.32/share/doc/mariadb -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DINSTALL_SYSCONFDIR=/usr/local/etc -DWITH_READLINE=yes
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/5.5.32 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mariadb/5.5.32/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mariadb/5.5.32/share/doc/mariadb -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8
@swsnider
swsnider / gist:6738039
Created September 28, 2013 03:25
CmakeCache.txt file from ~/Library/Logs/Homebrew/mariadb when build failed.
# This is the CMakeCache file.
# For build in directory: /tmp/-6FeE/mariadb-5.5.32
# It was generated by CMake: /usr/local/Cellar/cmake/2.8.11.2/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
@swsnider
swsnider / gist:6738028
Created September 28, 2013 03:23
Output of brew doctor, brew config, and brew install -v mariadb 2>&1
wsnider@Silass-MacBook-Pro : ~GOPATH/src
[1] % 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
import sys
if 'lib' not in sys.path:
sys.path.insert(0, 'lib')
@swsnider
swsnider / sample.html
Created September 8, 2012 18:46
Solution to problem 1
<script type="text/javascript">
google.load("feeds", "1");
google.setOnLoadCallback(initialize);
function initialize() {
var feed = new google.feeds.Feed("http://feeds.feedburner.com/tumblr/EJwT");
feed.setNumEntries(8);
feed.setResultFormat(google.feeds.Feed.JSON_FORMAT);
feed.load(function(result) {
if (!result.error) {
@swsnider
swsnider / broken_szl_brew
Created April 13, 2012 01:09
Result of 'brew install -v szl'
==> Downloading http://szl.googlecode.com/files/szl-1.0.tar.gz
Already downloaded: /Users/swsnider/Library/Caches/Homebrew/szl-1.0.tar.gz
/usr/bin/tar xf /Users/swsnider/Library/Caches/Homebrew/szl-1.0.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/szl/1.0
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/szl/1.0
checking build system type... i386-apple-darwin11.3.0
checking host system type... i386-apple-darwin11.3.0
checking target system type... i386-apple-darwin11.3.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
class ExtractRelevantTextNode(template.Node):
def __init__(self, field_name, query, fieldtext):
self.field_name, self.query, self.fieldtext = field_name.strip(), query.strip(), fieldtext.strip()
def render(self, context):
efffield_name = Variable(self.field_name).resolve(context)
effquery = Variable(self.query).resolve(context)
efffieldtext = Variable(self.fieldtext).resolve(context)
if type(self.query) == type(u""):
effquery = lucene.QueryParser(efffield_name, lu.getAnalyzer()).parse(effquery)