Skip to content

Instantly share code, notes, and snippets.

View erkattak's full-sized avatar

Erik Straub erkattak

View GitHub Profile
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
@erkattak
erkattak / .bashrc
Last active January 9, 2018 22:11
Bash Project Switch With Completion
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
@erkattak
erkattak / Dockerfile
Created December 18, 2017 04:34 — forked from bsedat/Dockerfile
Elixir Phoenix Umbrella App + Distillery Multistage Docker Build
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/
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
@erkattak
erkattak / AndroidManifest.xml
Created June 19, 2017 18:47
Android Application Setup for use with Charles Proxy
<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">
@erkattak
erkattak / README.md
Last active July 20, 2017 20:29
Odd Connect

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' \

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:

@erkattak
erkattak / README.md
Created November 1, 2016 03:49
Elementary OS / Dropbox Icon

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.

/* 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');
## 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