Skip to content

Instantly share code, notes, and snippets.

James Thornton espeed

Block or report user

Report or block espeed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@espeed
espeed / gist:8747309
Created Feb 1, 2014
clojure/pedestal war error in jetty container
View gist:8747309
2014-01-31 20:43:25.513:INFO:oejs.Server:main: jetty-9.1.0.v20131115
2014-01-31 20:43:25.540:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/opt/packages/jetty-distribution-9.1.0.v20131115/webapps/] at interval 1
2014-01-31 20:43:30.345:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@56164f3a{/,file:/tmp/jetty-0.0.0.0-8080-root.war-_-any-3794872074681783862.dir/webapp/,AVAILABLE}{/root.war}
2014-01-31 20:43:30.369:INFO:oejs.ServerConnector:main: Started ServerConnector@af616b7{HTTP/1.1}{0.0.0.0:8080}
INFO io.pedestal.service.http - {:line 64, :msg "GET /"}
ERROR i.p.s.http.impl.servlet-interceptor - {:line 261, :msg "error-ring-response triggered", :context {:io.pedestal.service.impl.interceptor/stack (#io.pedestal.service.impl.interceptor.Interceptor{:name :io.pedestal.service.http.impl.servlet-interceptor/stylobate, :enter #<servlet_interceptor$enter_stylobate io.pedestal.service.http.impl.servlet_interceptor$enter_stylobate@43b23922>, :leave #<servlet_interceptor$leave_styloba
@espeed
espeed / 0_reuse_code.js
Created Jan 26, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@espeed
espeed / heroku-clojure-newrelic-agent-log.bash
Last active Jan 1, 2016
Here's what you need to do to get the New Relic plugin working with a Clojure/Pedestal app on Heroku.
View heroku-clojure-newrelic-agent-log.bash
# How to configure a Clojure/Herokup app to use the New Relic add-on
# for monitoring and to prevent the app from sleeping.
#
# by James Thornton, http://jamesthornton.com
#
# Here's what you need to do to get the New Relic plugin working with a
# Clojure/Pedestal app on Heroku.
# It took some fiddling because there are several versions of docs
@espeed
espeed / fizzbuzz.py
Created Dec 13, 2013
FizzBuzz Example in Python
View fizzbuzz.py
# FizzBuzz Example in Python
# by James Thornton, http://jamesthornton.com
for num in range (1, 101):
fizz = "" if num % 3 else "FIZZ"
buzz = "" if num % 5 else "BUZZ"
print fizz + buzz if fizz or buzz else num
@espeed
espeed / bulbs_server_side_scripts_example.py
Last active Dec 26, 2015
Bulbs/Rexster server-side Gremlin scripts example.
View bulbs_server_side_scripts_example.py
# Bulbs/Rexster server-side Gremlin script example.
# by James Thornton, http://jamesthornton.com
>>> from bulbs.rexster import Graph, DEBUG
>>> g = Graph()
>>> g.config.server_scripts = True
>>> g.config.set_logger(DEBUG)
>>> james = g.vertices.create(name="James")
POST url: http://localhost:8182/graphs/emptygraph/vertices
POST body: {"name":"James"}
@espeed
espeed / install-hyperdex-on-fedora-19.bash
Last active Dec 22, 2015
HOWTO Install HyperDex on Fedora 19 - The HyperDex packages in the HyperDex Fedora repo are for Fedora 17, and they don't work on Fedora 19. Here is what you need to do to build and install HyperDex on Fedora 19...
View install-hyperdex-on-fedora-19.bash
# How to Install HyperDex 1.0x on Fedora 19
# by James Thornton, http://jamesthornton.com
# First ensure you have these Fedora 19 packages installed
sudo yum install git autoconf automake autoconf-archive \
libtool python-devel pyparsing popt-devel \
cityhash-devel gcc-c++ glog-devel leveldb-devel \
bison gperf flex python-sphinx pandoc help2man
@espeed
espeed / secure-peer-messaging.textile
Last active Dec 21, 2015
Preliminary ideas for the design of a secure, decentralized (peer-to-peer) replacement for email (possibly based on Apache Wave).
View secure-peer-messaging.textile

Preliminary Ideas for a Secure p2p Email Replacement

Summary: Brainstorm for the design of a secure, decentralized (peer-to-peer) replacement for email.

Goals

  • Secure p2p messaging; Decentralized messaging platform (no centralized server).
  • Do not rely on central Certificates of Authority (CA).
  • Leverage modern environment where users have multiple, always-on devices.
@espeed
espeed / HOTAIRBALLOON
Last active Dec 19, 2015
This is the first program I ever wrote... It was on the Commodore 64, and it displays a hot air balloon bouncing around the screen in 16 colors. I was probably 7 or 8. This program is the first example in the "C64 Programmers Reference Guide - Chapter 3: Programming Graphics on the Commodore 64" -- http://www.commodore.ca/manuals/c64_programmers…
View HOTAIRBALLOON
10 REM SPRITE EXAMPLE 1...
20 REM THE HOT AIR BALLOON
30 VIC=13*4096:REM THIS IS WHERE THE VIC REGISTERS BEGIN
35 POKEVIC+21,1:REM ENABLE SPRITE 0
36 POKEVIC+33,14:REM SET BACKGROUND COLOR TO LIGHT BLUE
37 POKEVIC+23,1:REM EXPAND SPRITE 0 IN Y
38 POKEVIC+29,1:REM EXPAND SPRITE 0 IN X
40 POKE2040,192:REM SET SPRITE 0'S POINTER
180 POKEVIC+0,100:REM SET SPRITE 0'S X POSITION
190 POKEVIC+l, 100:REM SET SPRITE 0'S Y POSITION
@espeed
espeed / gist:5898274
Last active Dec 19, 2015
Log4j 2 Notes
View gist:5898274

Log4j 2 Notes

Asynchronous Loggers for Low-Latency Logging

Log4j 2 contains next-generation Asynchronous Loggers based on the LMAX Disruptor library. In multi-threaded scenarios Asynchronous Loggers have 10 times higher throughput and orders of magnitude lower latency than Log4j 1.x and Logback. See Asynchronous Logging Performance for details. Otherwise, Log4j 2 performs faster than Log4j 1.x in critical areas and similarly to Logback under most circumstances. See Performance for more information. http://logging.apache.org/log4j/2.x/

@espeed
espeed / gist:5890056
Created Jun 29, 2013
http://localhost:8080/ -- no namespace error
View gist:5890056
Jun 29, 2013 1:07:02 AM com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: javax.servlet.ServletContext log: unavailable
java.lang.Exception: No namespace: airflow.app_servlet found
at clojure.core$the_ns.invoke(core.clj:3760)
at org.lpetit.ring.servlet.util$require_and_resolve.invoke(util.clj:7)
at org.lpetit.ring.servlet.RingHttpServlet_impl$_init_void.invoke(RingHttpServlet_impl.clj:9)
at org.lpetit.ring.servlet.RingHttpServlet.init(Unknown Source)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.lpetit.ring.servlet.RingHttpServlet.init(Unknown Source)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
You can’t perform that action at this time.