This file contains hidden or 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
// Uses packages: | |
// * org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.isActive | |
import kotlinx.coroutines.launch | |
import kotlin.time.Duration |
This file contains hidden or 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
// Distance is assumed to be in whole km and volume in whole L | |
data class Refuel(val distance: Int, val volume: Int) | |
data class Vehicle(val odometer: Int, val trip: Int, val refuels: List<Refuel> = emptyList()) | |
val vehicle = Vehicle(odometer = 25000, trip = 300, refuels = listOf( | |
Refuel(distance = 700, volume = 33), | |
Refuel(distance = 1100, volume = 48) | |
)) |
This file contains hidden or 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
call plug#begin() | |
Plug 'airblade/vim-gitgutter' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'itchyny/lightline.vim' | |
Plug 'neomake/neomake' | |
Plug 'scrooloose/nerdtree' | |
" Haskell | |
Plug 'neovimhaskell/haskell-vim' |
This file contains hidden or 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
const TrackType = gql` | |
type Track { | |
albums: [Album!] | |
artists: [Artist!] | |
title: String! | |
} | |
` | |
export default () => [AlbumType, ArtistType, TrackType] |
This file contains hidden or 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 gql from "graphql-tools" | |
const TrackType = gql` | |
type Track { | |
albums: [Album!]! | |
artists: [Artist!]! | |
title: String! | |
} | |
` |
This file contains hidden or 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
type Album { | |
artists: [Artist!] | |
title: String! | |
tracks: [Track!] | |
} |
This file contains hidden or 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 script to retrieve all HTML elements in the HTML5 | |
spec and generate a general module | |
""" | |
from functools import reduce | |
import urllib.request | |
def create_module(module_name, functions, content): | |
""" |
This file contains hidden or 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
accept | |
accept-charset | |
accesskey | |
action | |
alt | |
async | |
autocomplete | |
autofocus | |
autoplay | |
challenge |
This file contains hidden or 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
{ | |
;; This is your main proton configuration file | |
;; While using proton, all atom related configuration has to go inside here | |
;; Everything that is not set up through this file will get wiped on start | |
;; We gave you some cool defaults below but if you don't like it, feel free to change :) | |
;; Layers you wish to have active | |
;; To get a list of all available layers, check github.com/dvcrn/proton/tree/master/src/cljs/proton/layers | |
:layers [ | |
;; ----------------------------------- |