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
#!/bin/bash | |
tail -n +0 $1 \ | |
| nl -ba \ | |
| fzf --multi \ | |
--ansi \ | |
--no-sort \ | |
--reverse \ | |
--tac \ | |
--preview 'sed -n "$(({n}-4)),$(({n}+6))p" '$1' | nl -v $(({n}-4)) -ba' \ |
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 | bitmask | | |
+--------------------------------+---------------+ | |
| mode (light, dark) | 0b0100 | | |
| screen size (xs, sm, md, lg) | 0b0011 | | |
+--------------------------------+---------------+ | |
*/ | |
type Bits = number; |
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 react.dom.* | |
import react.styled | |
import kotlinx.browser.document | |
import org.w3c.dom.Window | |
import io.grpc | |
import org.graphql | |
val greetStub = grpc.stub!("proto/greeter.proto") // Type Inference & Code Generation from file contents | |
val Content = styled.div! { |
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
#!/bin/bash | |
gitlab_ci () { | |
gitlab-runner exec docker "$1" \ | |
--cache-dir=/tmp/gitlab-cache \ | |
--docker-cache-dir=/tmp/gitlab-cache \ | |
--docker-volumes=/tmp/gitlab-cache \ | |
--docker-volumes="$PWD"/deploy:/deploy \ | |
--env=DOCKER_CONFIG_JSON=/deploy/config.json \ | |
--env=DEPLOY_KUBECONFIG=/deploy/kubeconfig \ |
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
#!/bin/bash | |
helm upgrade -i efk stable/elastic-stack -n kube-system \ | |
--set elasticsearch.image.tag=6.7.0 \ | |
--set kibana.image.tag=6.7.0 \ | |
--set fluent-bit.backend.type=es \ | |
--set fluent-bit.backend.es.host=efk-elasticsearch-client.kube-system.svc.cluster.local \ | |
--set kibana.env.ELASTICSEARCH_HOSTS=http://efk-elasticsearch-client.kube-system.svc.cluster.local:9200 \ | |
--set fluent-bit.enabled=true \ | |
--set logstash.enabled=false |
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
export function TodoView() { | |
const state = useState<State>(State.PENDING) | |
const handleCreateTask(e: React.SyntheticEvent) { | |
// TODO | |
} | |
return <div> | |
<ol> | |
{tasks.map((task) => <Task task={task} />)} |
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 { action, observable } from 'mobx' | |
import { observer } from 'mobx-react' | |
import React, { useContext } from 'react' | |
class CounterViewModel { | |
@observable count: number = 0 | |
@action.bound public plus() { | |
this.count++ | |
} |
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
image: java:8-jdk | |
stages: | |
- test | |
- build | |
- deploy | |
variables: | |
DOCKER_DRIVER: overlay2 |
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
package com.spring.coroutine | |
import io.r2dbc.spi.ConnectionFactory | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.runApplication | |
import org.springframework.context.support.beans | |
import org.springframework.core.io.ClassPathResource | |
import org.springframework.data.annotation.Id | |
import org.springframework.data.r2dbc.connectionfactory.init.CompositeDatabasePopulator | |
import org.springframework.data.r2dbc.connectionfactory.init.ConnectionFactoryInitializer |
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
/** | |
output: | |
main run in [ main ] | |
fetchData run in [ DefaultDispatcher-worker-1 ] | |
runApplication run in [ main ] result: [ Hello Coroutine ] | |
*/ | |
import kotlinx.coroutines.* | |
fun main() = runBlocking { |