Skip to content

Instantly share code, notes, and snippets.

View jheidt's full-sized avatar
💭
:shipit: 👍

Jake jheidt

💭
:shipit: 👍
View GitHub Profile
The Challenge
-------------
Given the following riddle, write a regular expression describing all possible answers,
assuming you never make a move which simply undoes the last one you made.
The Riddle
----------
You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always.
You come upon a river and are compelled to cross it, but you can only carry one of the
three companions at a time. None of them can swim because this isn't THAT kind of riddle.
@salimane
salimane / gist:8958411
Last active August 29, 2015 13:56
ruby slow regex match
salimane at Salimanes-MacBook-Pro in ~
⚛ ruby --version
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
salimane at Salimanes-MacBook-Pro in ~
⚛ cat regex.rb
regex = %r{^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$}
link = "https://www.facebook.com/DUSA.ve?ref=stream"
puts link =~ regex
@rampage644
rampage644 / impala-build.md
Created November 24, 2014 15:56
Impala build

Building Impala

  • Version: cdh5-2.0_5.2.0
  • OS: Archlinux 3.17.2-1-ARCH x86_64
  • gcc version 4.9.2

Berkeley DB version >= 5

@girasquid
girasquid / ubuntu_setup.sh
Created September 24, 2011 17:30 — forked from kylefox/ubuntu_setup.sh
Automated setup for a Ubuntu server with git, ruby, rvm, nginx.
#!/usr/bin/env bash
# ----------------------------------------------------
#
# Automated setup for a Ubuntu server with git, ruby, rvm, nginx.
# (Used at Carbonmade)
#
# Usage:
# - SCP this file to your server: scp ubuntu_setup.sh you@server:~
# - Make it executable: chmod +x ubuntu_setup.sh
# - Run it: bash ubuntu_setup.sh
@ogrodnek
ogrodnek / gist:2933779
Created June 15, 2012 00:13
AWS Billing hive schema
create external table aws_billing(
InvoiceId string,
PayerAccountId string,
LinkedAccountId string,
RecordType string,
RecordID int,
BillingPeriodStartDate string,
BillingPeriodEndDate string,
InvoiceDate string,
PayerAccountName string,
@trustin
trustin / fontfix.patch
Last active November 30, 2015 15:47
OpenJDK 7 font rendering patch for Linux (cd openjdk/jdk; patch -p1 < fontfix.patch)
diff -r 19cc3b567644 make/sun/font/Makefile
--- a/make/sun/font/Makefile Wed Jan 22 12:34:24 2014 -0800
+++ b/make/sun/font/Makefile Fri Jan 24 21:41:23 2014 +0900
@@ -138,7 +138,7 @@
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
endif
- OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
+ OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype -lfontconfig
endif
#!/bin/bash
# The author of the original script is unknown to me. The first entry I can
# find was posted at 2010-03-21 09:50:09 on Arch Linux Forums (doesn't mean the
# poster is the author at all):
#
# https://bbs.archlinux.org/viewtopic.php?pid=728932#p728932
#
# I, Yu-Jie Lin, made a few changes and additions:
#
# -p, -t, -R, and -C
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
# Install genymotion
https://www.genymotion.com/
# Install Android SDK
# Download Genymotion-ARM-Translation v1.1
# Google it
# Genymotion:
# Using Google Nexus 7 - 4.3 - API 18 VM

How to Install Vector on Ubuntu 14

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser. More here.

Host machine

PCP Requirements

Vector requires PCP to collect data.

pkg-config