Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
type T struct { | |
A int | |
B string | |
} | |
t := T{23, "skidoo"} | |
s := reflect.ValueOf(&t).Elem() | |
typeOfT := s.Type() | |
for i := 0; i < s.NumField(); i++ { |
# Node.js app Docker file | |
FROM ubuntu:14.04 | |
MAINTAINER Thom Nichols "thom@thomnichols.org" | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
RUN apt-get -qq update | |
RUN apt-get install -y nodejs npm |
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
Array.prototype.flatMap = function(lambda) { | |
return Array.prototype.concat.apply([], this.map(lambda)); | |
}; |
ext { | |
mainClassName = "foo.bar.buz.mainClass" | |
basename = "fooBar" | |
version = "42.0" | |
} | |
task obfuscate(type: proguard.gradle.ProGuardTask) { | |
injars "./build/libs/${basename}-${version}.jar" | |
outjars "./build/libs/${basename}-${version}-obf.jar" |
This is a Node.js script, written in CoffeeScript. Of course you'll need Node.js and NPM. Additionally, it requires the Coffee Script compiler/interpreter and the Twilio package.
npm install -g coffee-script
npm install twilio
Once everything is ready, you can run the script like that:
Picking the right architecture = Picking the right battles + Managing trade-offs
kubectl get rs,secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create-f - |
package main | |
import ( | |
"net" | |
"fmt" | |
"syscall" | |
) | |
func main() { | |
addr, err := net.ResolveTCPAddr("tcp", "localhost:8090") |
package main | |
import ( | |
"encoding/json" | |
"log" | |
"os" | |
// We use pretty instead of the common go-spew or pretty-printing because, | |
// go-spew is vendored in client-go and causes problems | |
"github.com/kr/pretty" |