Skip to content

Instantly share code, notes, and snippets.

View gresrun's full-sized avatar

Greg Haines gresrun

  • YouTube
  • San Francisco, CA
View GitHub Profile
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by R configure 2.11.0, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/r/2.11.0
## --------- ##
## Platform. ##
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
MAKEFLAGS: -j4
==> Downloading http://cran.r-project.org/src/base/R-2/R-2.11.0.tar.gz
File already downloaded and cached to /Users/greg/Library/Caches/Homebrew
/usr/bin/tar xf /Users/greg/Library/Caches/Homebrew/r-2.11.0.tar.gz
@gresrun
gresrun / gist:826165
Created February 14, 2011 17:01
GnuTLS 2.10.4 Fails to Install
greg@macgreg:~ $ brew info gnutls
gnutls 2.10.4
http://www.gnu.org/software/gnutls/gnutls.html
Depends on: pkg-config, libgcrypt, libtasn1
/usr/local/Cellar/gnutls/2.10.2 (617 files, 7.1M)
http://github.com/mxcl/homebrew/commits/master/Library/Formula/gnutls.rb
greg@macgreg:~ $ brew install -v gnutls
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
@gresrun
gresrun / GTK+_v2.24.4_Fail.txt
Created April 5, 2011 18:53
GTK+ 2.24.4 Fails to Install
greg@macgreg:~ $ brew missing
greg@macgreg:~ $ brew doctor
Your OS X is ripe for brewing.
Any troubles you may be experiencing are likely purely psychosomatic.
greg@macgreg:~ $ brew install -v gtk+
==> Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.4.tar.bz2
File already downloaded and cached to /Users/greg/Library/Caches/Homebrew
/usr/bin/tar xf /Users/greg/Library/Caches/Homebrew/gtk+-2.24.4.tar.bz2
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.4 --disable-glibtest
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.4 --disable-glibtest
@gresrun
gresrun / gist:1425763
Created December 3, 2011 02:14
LLVM 3.0 Fails to Install - Related to OCAML???
$ brew update
Already up-to-date.
$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
NOTE: Versions of XCode newer than 4.2 don't include gcc 4.2.x.
/Library/Frameworks/Mono.framework detected
This can be picked up by Cmake's build system and likely cause the
build to fail, finding improper header files for libpng for instance.
function isPrime(n) {
if (n<2) return false;
if (n==2) return true;
for (var i=2; i<(n/2); i++) { if (n%i==0) return false; }
return true;
}
@gresrun
gresrun / redisBitSetTests.java
Created May 23, 2012 03:41 — forked from gmuller/redisBitSetTests.java
An attempt to understand byte and bit ordering in redis bitsets
import java.util.Arrays;
import java.util.BitSet;
import redis.clients.jedis.Jedis;
public class SieveOfEratosthenes {
/**
* @param args
*/
package net.greghaines.jesque;
import static net.greghaines.jesque.utils.JesqueUtils.entry;
import static net.greghaines.jesque.utils.JesqueUtils.map;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicBoolean;
import net.greghaines.jesque.worker.Worker;
import net.greghaines.jesque.worker.WorkerEvent;
public class ASCIIDiamond {
public static void main(final String... args) {
printDiamond(Integer.parseInt(args[0]));
}
public static void printDiamond(final int size) {
if (size % 2 == 0) {
throw new IllegalArgumentException("Size must be an odd number");
}
final int halfSize = (size / 2);
public class GoNumSquares {
private static final int BOARD_SIZE = 19;
public static void main(final String... args) {
int squareSum = 0;
for (int i = BOARD_SIZE; i > 0; i--) {
final int dim = (BOARD_SIZE - i) + 1;
squareSum += (dim * dim);
}