Skip to content

Instantly share code, notes, and snippets.

View taig's full-sized avatar

Niklas Klein taig

View GitHub Profile
@pfn
pfn / 01 - iota dsl sample.scala
Last active September 1, 2016 22:25
sample of a strongly typed layout dsl for android results in http://i.imgur.com/KS7KLR6.png
package iota.sample
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.graphics.drawable.Animatable
import android.widget._
import android.view.ViewGroup.LayoutParams._
import iota._
class MainActivity extends AppCompatActivity { self =>
@etaty
etaty / JsonCirceBodyParser.scala
Created November 5, 2015 17:30
json circe play framework body parser
package utils
import java.nio.ByteBuffer
import cats.data.Xor
import io.circe.Json
import play.api.http.LazyHttpErrorHandler
import play.api.http.Status._
import play.api.libs.iteratee.{Iteratee, Traversable}
import play.api.mvc.BodyParsers.parse._

Git Cheat Sheet

Commands

Getting Started

git init

or

@mrbobbytables
mrbobbytables / init-boot2docker.sh
Created November 11, 2014 11:48
boot2docker OSX mount helper
#!/bin/bash
set -o errexit -o nounset -o pipefail
usage() {
cat << EOF
USAGE:
init-boot2docker.sh -p [path] -u [uid] -g [gid]
-p Path to the working directory you wish to mount.
-u The uid you wish to mount the working directory as.
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing
@pfn
pfn / build.sbt
Created October 18, 2013 22:39
example build.sbt for a single project with many library projects
import android.Keys._
android.Plugin.androidBuild
name := "project-with-lib-projects"
unmanagedClasspath in Compile <<= ( baseDirectory
, unmanagedClasspath in Compile) map {
(base,cp) =>
val ignores = Set("android-support-v4.jar", "guava-14.0.1.jar")
@pfn
pfn / build.scala
Last active December 21, 2015 02:49
Load an arbitrary project from git, include it as an Android Library Project in our main application build.
import sbt._
import android.ArbitraryProject
object SampleBuild extends Build {
import android.Keys._
import android.Dependencies.LibraryProject
// we're gonna pull tag android-sdk-support_r11 from the support repo
val supportGit = uri("https://android.googlesource.com/" +
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 7, 2024 23:11
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx