Skip to content

Instantly share code, notes, and snippets.

View glenselle's full-sized avatar
🙌
Blessed. Soli Deo Gloria!

Glen Selle glenselle

🙌
Blessed. Soli Deo Gloria!
View GitHub Profile
@mrserverless
mrserverless / Cache-Buster-Dockerfile
Last active August 13, 2016 19:29
Quay.IO Cache Buster when triggering a github Dockerfile build
FROM busybox
# any thing after here will not be cached
# since Quay.IO check out will results in a different timestamp to the cache
ADD .git/HEAD /app/CACHE_BUSTER
RUN rm CACHE_BUSTER
haproxy.conf
============
frontend spdy
mode tcp
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3
option tcplog
log global
# route to nginx
<?
require("redis.php");
require("json.php");
$term = $_GET['term'];
$r = new Redis("127.0.0.1","6379");
$r->connect();
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10"));
@vratiu
vratiu / .bash_aliases
Last active June 26, 2024 08:15
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
BIN = ./node_modules/.bin
SRC = $(wildcard src/*.coffee)
LIB = $(SRC:src/%.coffee=lib/%.js)
build: $(LIB)
lib/%.js: src/%.coffee
@mkdir -p $(@D)
@$(BIN)/coffee -bcp $< > $@
@eknuth
eknuth / map.js
Created July 25, 2012 19:15
Using ESRI's Ocean Basemap with OpenLayers
var map = new OpenLayers.Map('map_container', {
allOverlays: true,
displayProjection: new OpenLayers.Projection("EPSG:4326")}),
esriOcean = new OpenLayers.Layer.XYZ("ESRI Ocean Basemap",
"http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/${z}/${y}/${x}",
{
sphericalMercator: true,
isBaseLayer: true,
numZoomLevels: 13