Skip to content

Instantly share code, notes, and snippets.

View juddey's full-sized avatar

Justin Lane juddey

View GitHub Profile
@juddey
juddey / transcoder.ex
Created April 17, 2018 19:34
Transcoding first attempt
defmodule Texapp.ServiceMonitor do
@services [Texapp.ServiceMonitor.Transcoder]
defmodule Result do
defstruct score: 0, text: nil, url: nil
end
def start_link(service, query, query_ref, owner) do
service.start_link(query, query_ref, owner)
end
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RCCManager.h"
#import <React/RCTLinkingManager.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
@juddey
juddey / Gavyn-Quotes.txt
Created February 10, 2018 21:59
Gavyn Quotes
"Don't mow your lawns too short"
@juddey
juddey / android-app-build.gradle.diff
Last active February 1, 2018 00:30
Detox 7.0.1 for Android Setup - diff
android {
compileSdkVersion 25
- buildToolsVersion "25.0.1"
+ buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.tiaki"
- minSdkVersion 16
+ minSdkVersion 18
targetSdkVersion 22
@juddey
juddey / reactotron.js
Created January 29, 2018 22:06
Reactotron Shiz
if (__DEV__ && console.tron) {
// straight-up string logging
console.tron.log('Hello, I\'m an example of how to log via Reactotron.')
// logging an object for better clarity
console.tron.log({
message: 'pass objects for better logging',
someGeneratorFunction: selectAvatar
})
@juddey
juddey / docker.sh
Last active December 8, 2017 00:29
Docker
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to container port 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
# Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers
# List all images on this machine
updateActive ({changed, viewableItems}) {
let active = this.state.activeIndex
let firstViewableItem = viewableItems[0].index
let lastViewableItem = viewableItems[viewableItems.length - 1].index
let nextState = {renderBottom: false, renderTop: false}
if (active < firstViewableItem) {
// Item is not viewable and should be rendered sticky on **top**
nextState.renderTop = true