Skip to content

Instantly share code, notes, and snippets.

View juddey's full-sized avatar

Justin Lane juddey

View GitHub Profile
// Builds according to dockerfile in directory
docker build $HOME/Desktop/dockerfile-two
// Removes all exited containers
docker rm $(docker ps --filter "status=exited" -q)
// Tags an image
docker tag 8ab71b445b80 juddey/chapel-ci-one:latest
// Removes all untagged images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
docker run --name anything -it --privileged juddey/chapel-ci-one bash
@juddey
juddey / failing view.txt
Created February 23, 2020 20:25
Detox - Failing View
View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=WM.LayoutParams{(0,0)(fillxfill) sim=#10 ty=1 fl=#81810100 wanim=0x103045b vsysui=0x500 needsMenuKey=2}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1794, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@edc8d45, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+-->ViewStub{id=16909225, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=fal
@juddey
juddey / store.js
Last active February 12, 2020 04:19
Mobx
import React from 'react'
import { types } from 'mobx-state-tree'
const Person = types
.model("person", {
name: types.optional(types.string, '')
})
.actions(self => ({
setName (name) {
self.name = name
@juddey
juddey / Link.js
Created January 16, 2020 03:24
Ws Connection Issue
@juddey
juddey / FormEmailAsync.js
Created September 7, 2019 22:45
EmailValidationAsync Field
import React, { useState } from 'react'
import { InputAdornment, Typography } from '@material-ui/core'
import Fade from '@material-ui/core/Fade'
import CircularProgress from '@material-ui/core/CircularProgress'
import { MdCheckCircle } from 'react-icons/md'
import { ErrorMessage } from 'formik'
import TextField from 'Components/TextField'
import { string } from 'yup'
import { useAsyncFn } from 'react-use'
import { useApolloClient } from '@apollo/react-hooks'
@juddey
juddey / gist:34a82d09b447fe70c4e56c08196620a8
Created February 10, 2019 22:42
Supported Ecto Field Types
array, binary, boolean, date, decimal, float, integer, map, naive_datetime, references, string, text, time, utc_datetime, uuid
https://devdocs.io/phoenix/ecto/ecto.schema
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *120.0 GB disk0
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *120.0 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_APFS Container disk2 119.8 GB disk1s2
@juddey
juddey / CentreSelector.test.js
Created October 12, 2018 04:27
Centre-Selector-Unit-Test
import React from 'react'
import { render } from 'testUtils'
import { fireEvent } from 'react-testing-library'
import CentreSelector from './CentreSelector'
const centres = [
{
centre_id: '123',
centre_name: 'Demo Centre'
},
@juddey
juddey / gist:34d64c46a0e0004ee01a5be53aa8f452
Created August 5, 2018 20:01
Hardware Spec for zerk's PC
a mandatory warning: not a professional hardware person here
https://www.pbtech.co.nz/product/CPUIT4560/Intel-Kaby-Lake-Pentium-G4560-35Ghz-Socket-LGA1151
https://www.pbtech.co.nz/product/MBDASU42105/ASUS-PRIME-H270-PRO-ATX-For-Intel-Kaby-Lake-LGA115
https://www.pbtech.co.nz/product/MEMCRU069200/Crucial-16GB-DESKTOP-DDR4-2400-MTs-PC4-19200-CL17
https://www.pbtech.co.nz/product/HDDSAM3500/Samsung-850-EVO-MZ-75E500BW-500GB-3D-V-NAND-SATA-I
https://www.pbtech.co.nz/product/MONDEL3018787/Dell-P2416D-24-WQHD-IPS-LED-Business-Monitor-2560X
https://www.pbtech.co.nz/product/CHAFSP71070/FSP-P1802-Mid-Tower-Case---2xUsb30---Dust-Filters
@juddey
juddey / something.jsx
Last active June 23, 2018 02:35
RNN-plain
import React from "react";
import { Text } from "react-native";
import { Navigation } from 'react-native-navigation';
class Simple extends React.Component {
render() {
return (<Text>Hello, I'm Awesome.</Text>);
}
}