Skip to content

Instantly share code, notes, and snippets.

View elmiko's full-sized avatar

Michael McCune elmiko

View GitHub Profile
@sub-mod
sub-mod / steps.md
Last active October 15, 2018 21:39
Create CRD Object as Project-admin in Openshift

CRD and ClusterRole Both need cluster-admin

Create a CRD ...just the definition as cluster-admin

cat >> crd.yaml << EOF
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: crontabs.stable.example.com
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@pdmack
pdmack / spongodb.py
Last active December 20, 2017 00:04
Adaptation of PySpark/MongoDB example illustrating dynamic jar loading: works with spark-submit AND python interpreter
from __future__ import print_function
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jkremser
jkremser / gist:01c5b22f9719442a416e9fd62d95b8ad
Last active August 3, 2017 12:17
torch tutorials@docker
git clone https://github.com/torch/tutorials.git
docker run -it -p 8888:8888 -p 6006:6006 -v $PWD/tutorials:/root/sharedfolder floydhub/dl-docker:cpu jupyter notebook
@pbazard
pbazard / download_quandl_wiki_prices.py
Last active February 9, 2018 19:49
Download Quandl WIKI EOD stock prices
import requests
import zip
# Quandl file name
filename = 'wiki_prices.zip'
# Fetch the wiki_prices.zip file
r = requests.get(
'https://www.quandl.com/api/v3/datatables/WIKI/PRICES?qopts.export=true&api_key=YOUR-API-KEY')
resp = r.json()
@kennwhite
kennwhite / https.go
Last active December 24, 2023 22:06
Simple https http/2 static web server with HSTS & CSP (A+ SSLLabs & securityheaders.io rating) in Go using LetsEncrypt acme autocert
package main
import (
"crypto/tls"
"golang.org/x/crypto/acme/autocert"
"log"
"net"
"net/http"
)
@paulp
paulp / oddity.txt
Created January 11, 2016 22:22
Whitespace Oddity
WHITESPACE ODDITY
by Paul Phillips, in eternal admiration of David Bowie, RIP
Bound Ctrl to Major mode
Bound Ctrl to Major mode
Read inputrc and set extdebug on
Bound Ctrl to Major mode (Ten, Nine, Eight, Seven, Six)
Connecting readline, options on (Five, Four, Three)
Check the syntax, may terminfo be with you (Two, One, Exec)
@ryan-williams
ryan-williams / metrics.properties
Created February 26, 2015 00:47
Spark metrics.properties example
# Enable Graphite
*.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSink
*.sink.graphite.host=<graphite host>
*.sink.graphite.port=<graphite port>
*.sink.graphite.period=10
# Enable jvm source for instance master, worker, driver and executor
master.source.jvm.class=org.apache.spark.metrics.source.JvmSource
worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource
driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource
@pkerpedjiev
pkerpedjiev / SelectableForceDirectedGraph
Last active May 25, 2023 04:59
D3 Selectable Force-Directed Graph
.
@kazuki
kazuki / README
Last active August 29, 2015 14:05
Hadoop SwiftFileSystem KeyStone v3 TRUST Support Patch
Added configuration parameter "fs.swift.service.<name>.trust-id".
When you use "fs.swift.service.<name>.trust-id" parameter,
you have to set "fs.swift.service.sic.auth.url" to Keystone V3 URL (http://keystone-host:5000/v3/auth/tokens)
Example:
$ hadoop fs -ls -Dfs.swift.service.sahara.auth.url=http://localhost:5000/v3/auth/tokens \
-Dfs.swift.service.sahara.username=<swift-proxy-user> \
-Dfs.swift.service.sahara.password=<swift-proxy-user-password> \
-Dfs.swift.service.sahara.trust-id=<trust-id> \
swift://<container-name>.sahara/