Skip to content

Instantly share code, notes, and snippets.

View stefanjenkner's full-sized avatar
✌️

Stefan Jenkner stefanjenkner

✌️
View GitHub Profile
@iMilnb
iMilnb / snsread.py
Created August 2, 2015 20:20
Basic Flask snippet to handle AWS SNS messages and subscription
from flask import Flask, request
import requests
import json
app = Flask(__name__)
def msg_process(msg, tstamp):
js = json.loads(msg)
msg = 'Region: {0} / Alarm: {1}'.format(
js['Region'], js['AlarmName']
@ajbrown
ajbrown / CloudFormation.template
Created June 18, 2015 17:24
CloudWatch mappings of AWS EC2 Instance types to Java Heap sizes
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Use these mappings for cloudwatch templates which launch a java process. They define a heap size close to (but never over) 70% of the available RAM, at multiples of 64 megabytes. No heap is declared over 32GB for performance reasons.",
"Mappings" : {
"AWSInstanceType2JavaMaxHeap" : {
"t1.micro" : { "Heap" : "384m" },
"t2.micro" : { "Heap" : "640m" },
"t2.small" : { "Heap" : "1280m" },
"t2.medium" : { "Heap" : "2816m" },
"t2.large" : { "Heap" : "5g" },
@jstaffans
jstaffans / clojured_2015.md
Last active August 29, 2015 14:14
ClojureD notes

Notes from ClojureD 24.1.2015

Albrecht Schmidt: "Start your engine: My Clojure Bot in the Hello World Open 2014"

  • Hello World Open: programming contest organised by Reaktor and Supercell with ~2500 teams, worldwide distribution
    • Client-server car race, cards driven with some parameters such as decelerate/accelerate, change lanes
    • Organisers provided test server with simple testing UI
  • Parameters for car are quite simple: current angle, position etc
  • Clojure works well for processing simple data structures like this - analysis, storing, examining
  • Used Incanter to plot bot data during test (throttles vs. angles)
@stilkov
stilkov / Piraten2013.md
Last active December 23, 2015 14:49
Fünf Gründe, aus denen ich morgen Piraten wähle

Aus Gründen, über die ich mir selbst nicht ganz klar bin, verspüre ich einen starken Drang, meine politische Meinung zu teilen. Deshalb hier ganz kurz:

Fünf Gründe, aus denen ich morgen Piraten wähle

Netzkompetenz: Ich habe die Nase absolut voll davon, dass Leute ohne jede Kenntnis von der Sache Gesetze zur digitalen Gesellschaft erfinden. Dass die Piraten in technischer, aber auch juristischer Kompetenz hier ganz weit vorne liegen, bestreitet wahrscheinlich niemand.

Bürgerrechte: Das scheint ein Thema zu sein, das den meisten Bürgern – und in der Folge insbesondere den sogenannten „Volksparteien” – vollkommen egal oder sogar ein Dorn im Auge ist. Bei den Piraten sehe ich hier das mit Abstand klarste Bekenntnis.

Transparenz: Während die Piraten Privatsphäre für Bürger und völlige Transparenz für den Staat und seine Organe fordern, scheint es insbesondere unserer Regierung genau andersherum lieber zu sein.

@thomasgohard
thomasgohard / .travis.yml
Last active December 21, 2015 19:49
How to enable Jekyll+Prose on a GitHub repository.
language: ruby
branches:
only:
- master
script:
- "bundle exec jekyll build"
- ./build.sh
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="//link[@rel='import']">
<xsl:copy-of select="document(@href)" />
</xsl:template>
</xsl:stylesheet>
@magomi
magomi / setAdium
Created June 18, 2013 09:31
change adium status
tell application "AppleScript Runner"
set temp to display dialog "new status" default answer "away, ..."
end tell
set newStat to the text returned of temp
set AppleScript's text item delimiters to {","}
set statusType to the first text item of newStat
set statusMessage to the second text item of newStat
tell application "Adium"
@ficusk
ficusk / GsonRequest.java
Last active April 9, 2024 09:03
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
@kevinold
kevinold / .ackrc
Created February 10, 2013 13:54 — forked from hernamesbarbara/.ackrc
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code
#to install ack, see http://betterthangrep.com/
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>'
#ack will search all files in the current directory & sub-directories
#here's how I have my config file setup. this file is located on mac osx here
# ~/.ackrc
# Always sort the files
@adamgit
adamgit / .gitignore
Last active June 2, 2024 09:58
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#