Skip to content

Instantly share code, notes, and snippets.

View joshgoebel's full-sized avatar
💭
Playing with GitHub status.

Josh Goebel joshgoebel

💭
Playing with GitHub status.
  • CoverMyMeds
  • Louisville, KY
View GitHub Profile
# this is needed so if someone later makes a public post private that
# the search won't blow up because it can't find that id
Ultrasphinx::Search.client_options[:ignore_missing_records]=true
<?php
echo "do something evil test\n";
echo "your computer is toast\n";
?>
sub vcl_recv {
#FASTLY recv
}
sub vcl_hash {
#FASTLY hash
}
sub vcl_error {
location @503 {
add_header Maintenance "yes";
error_page 405 = /system/maintenance.html;
# Serve static assets if found.
if (-f $request_filename) {
break;
}

ruby-1.9.3-p448 cumulative performance patch for rbenv

(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)

This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

@joshgoebel
joshgoebel / ephemeral_token.rb
Created December 16, 2015 22:04 — forked from evadne/ephemeral_token.rb
Ephemeral Secure Token with JWT
class EphemeralToken
attr_reader :origin, :targets, :expires_at, :payload
class TokenInvalid < StandardError; end
class TokenExpired < TokenInvalid; end
Algorithm = 'HS512'
Secret = ENV['SECRET_EPHEMERAL_TOKEN_KEY']
ObjectToNotation = -> (target) { [target.class.model_name.name, target.id] }
NotationToObject = -> ((model_name, model_id)) { model_name.constantize.find_by_id(model_id) }
// MASKED
void drawExternalMask(int16_t x, int16_t y, const uint8_t *bitmap,
const uint8_t *mask, uint8_t frame, uint8_t mask_frame);
// = sprite UNMASKED
void drawOverwrite(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
// AND (~sprite) SPRITE_IS_MASK_ERASE
void drawErase(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
// OR (sprite) SPRITE_IS_MASK
void drawSelfMasked(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
// internal masking SPRITE_PLUS_MASK
r = pipeline(3) \
| :dec \
| [:add, 2] \
| [:mul, 5] \
| :double
puts r.value
r = pipeline(3) do
dec
@joshgoebel
joshgoebel / # crystal-lang - 2017-01-24_23-55-45.txt
Created January 25, 2017 04:58
crystal-lang on macOS 10.12.2 - Homebrew build logs
Homebrew build logs for crystal-lang on macOS 10.12.2
Build date: 2017-01-24 23:55:45
~/work/crystal-0.20.5 % PATH="../crystal-0.20.4-1/bin:$PATH" make crystal release=true
Using /Users/jgoebel/.brew/bin/llvm-config [version=3.9.1]
c++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/Users/jgoebel/.brew/bin/llvm-config --cxxflags`
cc -fPIC -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
./bin/crystal build --release -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
LIBRARY_PATH=/Users/jgoebel/work/crystal-0.20.4-1/embedded/lib:/Users/jgoebel/.brew/lib:
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0