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
# OSX 4Gb with `RAMDisk` name | |
diskutil erasevolume HFS+ 'RAMDisk' `hdiutil attach -nomount ram://8388608` |
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
ctrlPressed = false | |
keyPressed = false | |
layoutWatcher = hs.eventtap.new({hs.eventtap.event.types.flagsChanged, hs.eventtap.event.types.keyUp}, function(e) | |
local flags = e:getFlags() | |
local keyCode = e:getKeyCode() | |
if flags.cmd and keyCode == 0x36 and not (flags.alt or flags.shift or flags.ctrl or flags.fn) then | |
ctrlPressed = true | |
keyPressed = false | |
elseif ctrlPressed and not (flags.cmd or flags.alt or flags.shift or flags.ctrl or flags.fn) and not keyPressed then |
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
package com.ninetyseconds.auckland.di; | |
@kotlin.Metadata(mv = {1, 1, 6}, bv = {1, 0, 1}, k = 1, d1 = {"\u0000\u00ea\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u000 |
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
val curried: (Int) -> (Int) -> (Int) -> Int = { i1 -> { i2 -> { i3 -> i1 + i2 + i3 } } } | |
val partial: (Int) -> (Int) -> Int = curried(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
fun exec(str: String) = ProcessBuilder(str.split(" ")) | |
.redirectInput(ProcessBuilder.Redirect.PIPE) | |
.redirectOutput(ProcessBuilder.Redirect.PIPE) | |
.redirectError(ProcessBuilder.Redirect.PIPE) | |
.start() | |
.inputStream | |
.reader() | |
.readLines() | |
.forEach(::println) |
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
public final class ApiService implements UserApi, EditsApi, TasksApi, TodosApi, ShootsApi, OthersApi, BrandsApi, BriefsApi, CreatorApi, IdeatesApi, ProjectsApi, PromotesApi, LocationApi, FeedbackApi, ActivityApi, ResourcesApi, WorkflowsApi, ContractsApi, CategoriesApi, AttachmentsApi, RegistrationApi, OpportunitiesApi { | |
// $FF: synthetic field | |
private final UserApi $$delegate_0; | |
// $FF: synthetic field | |
private final EditsApi $$delegate_1; | |
// $FF: synthetic field | |
private final TasksApi $$delegate_2; | |
// $FF: synthetic field | |
private final TodosApi $$delegate_3; | |
// $FF: synthetic field |
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 RxTest { | |
@Test fun forward() { | |
fun <T : Any, R : Any> Observable<T>.forwardFlatMap(block: () -> Observable<R>): Observable<Pair<T, R>> | |
= flatMap { item -> block().map { item to it } } | |
Observable.just("") | |
.flatMap { str -> | |
Observable.just(1) | |
.map { str to it } |
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
ArrayList<Student> students = new ArrayList<Student>() {{ | |
add(new Student("John", 0)); | |
add(new Student("Julia", 2)); | |
add(new Student("Matt", 1)); | |
add(new Student("Katie", 0)); | |
add(new Student("Dan", 0)); | |
}}; | |
ArrayList<Student> firstList = new ArrayList<>(); | |
ArrayList<Student> secondList = new ArrayList<>(); |
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
public final class Person { | |
private String name; | |
private int age; | |
public Person(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
public Person(String name) { |