Skip to content

Instantly share code, notes, and snippets.

Pete Hodgson moredip

Block or report user

Report or block moredip

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
@ajmath
ajmath / ConsoleJsonAppenderFactory.java
Last active Mar 14, 2019
Dropwizard Custom Appender
View ConsoleJsonAppenderFactory.java
package io.github.ajmath;
import io.dropwizard.logging.AbstractAppenderFactory;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.contrib.jackson.JacksonJsonFormatter;
import ch.qos.logback.contrib.json.classic.JsonLayout;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.ConsoleAppender;
import ch.qos.logback.core.Layout;
@akiellor
akiellor / gist:12db63d9b578447b9aed
Created Feb 6, 2015
Mocha/Promise error detection.
View gist:12db63d9b578447b9aed
var falafel = require('falafel');
var fs = require('fs');
var file = process.argv[2];
var src = fs.readFileSync(file).toString();
var output = falafel(src, {loc: true}, function (node) {
if (node.type === 'Identifier' && node.name === "it") {
var testBody = node.parent.arguments[1].body.body
var lastStatement = testBody[testBody.length - 1];
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 13, 2019
Deploy an iOS app to testflight using Travis CI
View .travis.yml
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@jlong
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
You can’t perform that action at this time.