Skip to content

Instantly share code, notes, and snippets.

View androa's full-sized avatar

André Roaldseth androa

View GitHub Profile
@androa
androa / Dockerfile
Last active November 23, 2018 13:55
Minimal reproduction of sigterm/int
FROM navikt/java:8
RUN wget -O /dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod +x /dumb-init
WORKDIR /app
COPY . /app/
ENTRYPOINT ["/dumb-init", "--", "/app/entrypoint.sh"]

Keybase proof

I hereby claim:

  • I am androa on github.
  • I am androa (https://keybase.io/androa) on keybase.
  • I have a public key whose fingerprint is 2104 BC35 29BD 4965 4C88 0D75 643C B2AA EAE7 E977

To claim this, I am signing this object:

@androa
androa / zipcodes.java
Created December 21, 2017 15:32
Distribution of zipcodes with Kafka
static final String ZIPCODES = "zipcodes";
final KTable<Long, Zipcode>
zipcodeTable =
builder.table(ZIPCODE_TOPIC Materialized.<Long, Zipcode, KeyValueStore<Bytes, byte[]>>as(ZIPCODES)
.withKeySerde(Serdes.Long())
.withValueSerde(Serdes.String));
final ReadOnlyKeyValueStore<Long, Zipcode> zipcodeStore = streams.store(ZIPCODES,
QueryableStoreTypes.<Long, Zipcoe>keyValueStore());

Keybase proof

I hereby claim:

  • I am androa on github.
  • I am androa (https://keybase.io/androa) on keybase.
  • I have a public key whose fingerprint is 4690 59F2 FA4E A51C 6F61 C818 49CE 5591 E4DB 9B61

To claim this, I am signing this object:

@androa
androa / Dockerfile
Last active August 29, 2015 14:08
Dockerifing Imbo
# DOCKER-VERSION 1.0.1
FROM ubuntu:14.04
# Install necessary software for Imbo Web servers.
RUN apt-get update && apt-get -y install curl php5 apache2 php5-json php5-imagick php5-mongo php5-memcached
# Add the source code of Imbo
COPY . /imbo
# Install necessary Imbo dependencies.
@androa
androa / imbo-install
Last active August 29, 2015 14:06
Imbo installer
#!/bin/bash
curl -sS https://getcomposer.org/installer | php
php composer.phar create-project -sdev --no-interaction androa/imbo-bootstrap $1
@androa
androa / master.php
Last active December 24, 2015 23:48
<?php
$cnn = new AMQPConnection();
$cnn->connect();
$ch = new AMQPChannel($cnn);
$ex = new AMQPExchange($ch);
$ex->setName('exchangeName');
$ex->setType(AMQP_EX_TYPE_DIRECT);
$ex->declareExchange();
@androa
androa / ZF2 issue #4879
Created September 12, 2013 15:06
ZF2 issue #4879
diff --git a/library/Zend/I18n/Translator/Translator.php b/library/Zend/I18n/Translator/Translator.php
index 5b2c156..bd717ac 100644
--- a/library/Zend/I18n/Translator/Translator.php
+++ b/library/Zend/I18n/Translator/Translator.php
@@ -232,6 +232,18 @@ class Translator
}
/**
+ * Check if the translator has the sufficient configuration to actually
+ * perform translations.
@androa
androa / .svn_completion_remote_paths.sh
Created December 19, 2012 13:21
A tiny implementation of bash auto completion of remote paths when using Subversion. Requires that you have a working copy and are using ^/ to indicate that it's a remote url. Add the following file and add "source ~/.svn_completion_remote_paths" to your ~/.bash_profile
#!/bin/bash
function complete_remote_paths() {
word_to_complete=${COMP_WORDS[COMP_CWORD]}
command_line=${COMP_LINE}
# If the command line contains ^/ we should start completing
if [[ "$command_line" == *^/* ]]; then
# Create a base path for svn to use which only contains complete folder
# names. Examples:
# ^/bra => ^/
@androa
androa / public-js-bootstrap.js
Created August 15, 2012 10:10
r.js 2.x is not building in the same manner as r.js 1.x
define(function(){
var requireJsConfig = {
enforceDefine: true,
shim: {
jquery: {
exports: '$'
},
underscore: {
exports: '_',
deps: ['jquery']