Skip to content

Instantly share code, notes, and snippets.

Erik Straub brkattk

Block or report user

Report or block brkattk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MainFragment.kt
package com.oddnetworks.oddnexttv.ui
import android.accounts.Account
import android.content.Intent
import android.graphics.drawable.Drawable
import android.os.Bundle
import androidx.leanback.app.BackgroundManager
import androidx.leanback.app.BrowseSupportFragment
import androidx.leanback.widget.*
import androidx.core.content.ContextCompat
@brkattk
brkattk / .bashrc
Last active Jan 9, 2018
Bash Project Switch With Completion
View .bashrc
c() { cd "$HOME/Projects/${*}"; }
_c() {
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=($(compgen -W "$(find $HOME/Projects -mindepth 2 -maxdepth 2 -type d | cut -d/ -f5-)" -- $cur))
}
complete -o nospace -F _c c
@brkattk
brkattk / Dockerfile
Created Dec 18, 2017 — forked from bsedat/Dockerfile
Elixir Phoenix Umbrella App + Distillery Multistage Docker Build
View Dockerfile
FROM elixir:1.4.5 as asset-builder-mix-getter
ENV HOME=/opt/app
RUN mix do local.hex --force, local.rebar --force
# Cache elixir deps
COPY config/ $HOME/config/
COPY mix.exs mix.lock $HOME/
COPY apps/myproject_web/mix.exs $HOME/apps/myproject_web/
COPY apps/myproject_web/config/ $HOME/apps/myproject_web/config/
View ensure_resource_type.ex
defmodule ConnectWeb.Web.Plug.EnsureResourceType do
@moduledoc """
This plug ensures that the current_resource's `__struct__` is of the expected type.
If one is not found, or is not the expected type, the handler module's `unauthenticated/2` method is called.
If a handler is not defined, a `ConnectWeb.Web.Unauthenticated` exception is raised instead.
## Example
@brkattk
brkattk / AndroidManifest.xml
Created Jun 19, 2017
Android Application Setup for use with Charles Proxy
View AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config">
@brkattk
brkattk / README.md
Last active Jul 20, 2017
Odd Connect
View README.md

POST /api/connections

Request

curl -X POST \
  https://oddconnect.com/api/connections \
  -H 'accept: application/json' \
  -H 'authorization: bearer your-org-token-here' \
  -H 'content-type: application/json' \
View keybase.md

Keybase proof

I hereby claim:

  • I am brkattk on github.
  • I am brkattk (https://keybase.io/brkattk) on keybase.
  • I have a public key whose fingerprint is 7531 6C14 B49A 8E95 6FA5 37FD 82A6 B975 8062 3E2A

To claim this, I am signing this object:

@brkattk
brkattk / README.md
Created Nov 1, 2016
Elementary OS / Dropbox Icon
View README.md

Getting Dropbox to use an icon in Elementary Luna

  1. Save start-dropbox.sh to a directory.

  2. Ensure start-dropbox.sh is executable.

  3. Place dropbox-better.desktop in ~/.config/autostart.

  4. Ensure Exec= line of dropbox-better.desktop is an absolute path to wherever you placed start-dropbox.sh.

View response-json-api-spec.js
/* global describe, beforeAll, it, expect */
/* eslint prefer-arrow-callback: 0 */
/* eslint-disable max-nested-callbacks */
'use strict';
const JSONSchemaValidator = require('jsonschema').Validator;
const Validator = new JSONSchemaValidator();
const MockExpressResponse = require('mock-express-response');
const jsonApiSchema = require('../support/jsonapi-schema.json');
const responseJsonApi = require('../../lib/middleware/response-json-api');
View local.properties
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Users/brkattk/Library/Android/sdk
You can’t perform that action at this time.