Skip to content

Instantly share code, notes, and snippets.

@lukaswelte
lukaswelte / relay-pass-variables-to-child-components-example.js
Last active May 4, 2019 20:50
Pass relay variables down to other components
class ChildComponent extends React.Component {
render() {
const {hello} = this.props.greetings;
return <h1>{hello}</h1>;
}
}
const ChildContainer = Relay.createContainer(ChildComponent, {
initialVariables: {
name: 'A',

Keybase proof

I hereby claim:

  • I am lukaswelte on github.
  • I am lukaswelte (https://keybase.io/lukaswelte) on keybase.
  • I have a public key ASDpCYr3It58ughhTBsY46QLLc2GPaf6FBNcNbTZjPVGqAo

To claim this, I am signing this object:

@lukaswelte
lukaswelte / Map.java
Last active October 26, 2015 11:16
MapReduce Wordcount
public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> {
private final static IntWritable one = new IntWritable(1);
private Text word = new Text();
public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {
String line = value.toString();
StringTokenizer tokenizer = new StringTokenizer(line);
while (tokenizer.hasMoreTokens()) {
word.set(tokenizer.nextToken());
output.collect(word, one);
@lukaswelte
lukaswelte / OnePageForm.php
Created January 13, 2015 08:27
A simple one page form
<html>
<body>
<?php
if ( isset($_GET['g'] ) OR isset($_GET['n'] ) OR isset($_GET['t'] ) )
{
echo "Anrede: ". $_GET['g'];
echo "Namen: ". $_GET['n'];
@lukaswelte
lukaswelte / mappoints.geojson
Created December 16, 2014 15:09
Map Points Stuttgart
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukaswelte
lukaswelte / haproxy_dns_cfg.sh
Last active August 29, 2015 14:10
Marathon Bridge Cluster by Task
#!/bin/bash
set -o errexit -o nounset -o pipefail
function -h {
cat <<\USAGE
USAGE: haproxy_cfg <marathon host:port>
haproxy_cfg generates a config file to run HAProxy on localhost and proxy to a number of backend hosts.
To gracefully reload haproxy:
@lukaswelte
lukaswelte / imageOptim Xcode runscript
Last active August 29, 2015 13:56
Run Script to optimize the images with ImageAlpha and ImageOptim using https://github.com/JamieMason/ImageOptim-CLI
if [ "${CONFIGURATION}" = "Release" ]; then
.${SRCROOT}/optimizeImages.sh ${SRCROOT}
fi
@lukaswelte
lukaswelte / octokit.podspec
Created November 19, 2013 13:23
OctoKit Podspec
Pod::Spec.new do |s|
s.name = "OctoKit"
s.version = "0.4"
s.summary = "GitHub API client for Objective-C."
s.homepage = "https://github.com/octokit/octokit.objc"
s.license = "MIT"
s.author = { "GitHub" => "support@github.com" }
s.source = { :git => "https://github.com/octokit/octokit.objc.git", :tag => "#{s.version}" }
@lukaswelte
lukaswelte / stackmob.podspec
Last active December 27, 2015 11:19
Stackmob Podspec with updated AFNetworking
Pod::Spec.new do |s|
s.name = 'StackMob'
s.version = '2.2.0'
s.license = 'Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
s.summary = "StackMob's SDK for accessing the StackMob Services on iOS."
s.homepage = 'http://stackmob.com'
s.author = { 'StackMob' => 'info@stackmob.com' }
s.source = { :git => 'https://github.com/stackmob/stackmob-ios-sdk.git', :tag => s.version.to_s }
s.ios.deployment_target = '5.0'
s.ios.frameworks = 'MobileCoreServices'
@lukaswelte
lukaswelte / ShareKit.podspec
Last active December 23, 2015 02:19
ShareKit 2.4.1 Podspec
Pod::Spec.new do |s|
s.name = 'ShareKit'
s.version = '2.4'
s.platform = :ios, '5.0'
s.summary = 'Drop in sharing features for all iPhone and iPad apps.'
s.homepage = 'http://getsharekit.com/'
s.author = 'ShareKit Community'
s.source = { :git => 'https://github.com/ShareKit/ShareKit.git', :tag => '2.4' }
s.license = { :type => 'MIT',
:text => %Q|Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n| +