This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyRepository(private val externalScope: CoroutineScope) { /* ... */ } | |
class MyApplication : Application() { | |
// Application-scoped types that any class in the app could access | |
// using the applicationContext. | |
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.Default) | |
val myRepository = MyRepository(applicationScope) | |
} |
“clang”[ˈklæŋ] is the compiler based on LLVM for C, C++, Objective-C, and Objective-C++. clang is needed to install in order to Swift. Run the following code in Ubuntu terminal.
Before installing swift “libpython2.7” and “libpython2.7-dev” are needed to get Swift running. Run the following code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH="/home/justinsmith/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | |
ZSH_THEME="robbyrussell" | |
# Set list of themes to pick from when loading at random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
# TERM variable | |
# | |
# This value is used to set the `$TERM` environment variable for | |
# each instance of Alacritty. If it is not present, alacritty will | |
# check the local terminfo database and use `alacritty` if it is | |
# available, otherwise `xterm-256color` is used. | |
TERM: xterm-256color | |
# Background opacity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- general ------------------------------------------------------------------- | |
set -g default-terminal "screen-256color" # colors! | |
setw -g xterm-keys on | |
set -s escape-time 10 # faster command sequences | |
set -sg repeat-time 600 # increase repeat timeout | |
set -s focus-events on | |
bind C-a send-prefix -2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"coc.preferences.colorSupport": true, | |
"coc.preferences.formatOnSaveFiletypes": [ | |
"css", | |
"html", | |
"javascript", | |
"javascriptreact", | |
"json", | |
"liquid", | |
"scss" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin indent on | |
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'Yggdroot/indentLine' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'christoomey/vim-sort-motion' | |
Plug 'editorconfig/editorconfig-vim' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.reflect.KProperty | |
import kotlin.system.measureTimeMillis | |
class Memoize<T, R>(val fn: (T) -> R) { | |
private val cache = mutableMapOf<T, R>() | |
operator fun getValue(thisRef: Any?, property: KProperty<*>) = | |
{ arg: T -> cache.getOrPut(arg) { fn(arg) } } | |
} |
NewerOlder