Skip to content

Instantly share code, notes, and snippets.

Avatar

Arno Broekhof arnobroekhof

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am arnobroekhof on github.
  • I am arnobroekhof (https://keybase.io/arnobroekhof) on keybase.
  • I have a public key whose fingerprint is 58C4 60AE 365C B6E6 DF8C 7279 FF78 4CE8 3E0C 65D5

To claim this, I am signing this object:

@arnobroekhof
arnobroekhof / distcp-to-s3.sh
Created Jun 27, 2019
Copy files from HDFS to s3 using distcp behind a proxy
View distcp-to-s3.sh
#!/bin/sh -e
PROXY_HOST="<XXX.XXX.XXX.XXX>"
PROXY_PORT=3128
HDFS_URI=hdfs://<NAMENODE>
HDFS_PATH="/my/data/path"
S3_ACCESS_KEY="<S3_ACCESS_KEY>"
S3_SECRET_KEY="<S3_SECRET_KEY>"
S3_BUCKET="<S3_BUCKET>"
S3_PATH="<PATH_ON_S3>"
@arnobroekhof
arnobroekhof / starbucks.go
Created Apr 12, 2019
starbucks.go --> example
View starbucks.go
package main
import (
"fmt"
"time"
)
type Barista struct {
name string
@arnobroekhof
arnobroekhof / example_s3_bucket_objects.tf
Created Jul 12, 2018
Terraform 0.11.x loop through a map and create a s3 bucket with objects with specific content based on a maps --> key, value
View example_s3_bucket_objects.tf
## construct a map with object keys and values
variable "object_list" {
type = "map"
default = {
content1 = "this is example content 1",
content2 = "this is example content 2"
}
}
## construct the bucket name
@arnobroekhof
arnobroekhof / example_local_file.tf
Last active Apr 21, 2020
Terraform 0.11.x loop through a map and create files with content based on a maps --> key, value
View example_local_file.tf
variable "object_list" {
type = "map"
default = {
content1 = "this is example content 1",
content2 = "this is example content 2"
}
}
resource "local_file" "local_files" {
count = "${length(var.object_list)}" # perform this action based on the amount of items in the map
@arnobroekhof
arnobroekhof / docker-compose-influxdb.yml
Created Mar 1, 2018
Docker compose file for influxdb and grafana
View docker-compose-influxdb.yml
version: "3.2"
# run script
# docker swarm init
# docker stack deploy timeseries -c docker-compose.yml
services:
influxdb:
image: influxdb:latest
ports:
- 8086:8086
@arnobroekhof
arnobroekhof / ecpclient.py
Created Jun 30, 2017
Python saml Ecp client
View ecpclient.py
"""
This simple client uses standard Python modules
along with the Python lxml toolkit from
http://lxml.de/
to demonstrate how a SAML ECP client works.
Studying this client is not an acceptable replacement
for reading the ECP profile [ECP] available at
View JavaStlyle-idea.xml
<code_scheme name="JavaStyle">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
View GraphiteMetricsExport.java
@Service
@ExportMetricWriter
public class MetricsGraphiteExport {
@Autowired
private MetricRepository _metricRepository;
@Value("${graphite.server:'localhost'}")
private String graphiteServer;
@Value("${graphite.port:'2003'}")
View TwitterClient.java
package TwitterClient
import com.twitter.hbc.ClientBuilder;
import com.twitter.hbc.core.Client;
import com.twitter.hbc.core.Constants;
import com.twitter.hbc.core.Hosts;
import com.twitter.hbc.core.HttpHosts;
import com.twitter.hbc.core.endpoint.StatusesFilterEndpoint;
import com.twitter.hbc.core.processor.StringDelimitedProcessor;
import com.twitter.hbc.httpclient.auth.Authentication;
You can’t perform that action at this time.