Skip to content

Instantly share code, notes, and snippets.

View antonve's full-sized avatar
💨
Building tadoku.app

Anton Van Eechaute antonve

💨
Building tadoku.app
View GitHub Profile
@tanmay-bhat
tanmay-bhat / .gitlab-ci.yml
Last active April 3, 2024 20:34
Using Kaniko to build and push images through Gitlab-CI to ECR
#base image in which all stages are executed
image: alpine
# Ordered stages of the CI pipeline
stages:
- build_and_push
build and push docker image:
stage: build_and_push
only:
variables:
@yokawasa
yokawasa / ghcr.md
Last active May 11, 2024 00:50
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@j-bullard
j-bullard / App.tsx
Created July 4, 2021 07:15
Headless UI with React Hook Forms
import "./styles.css";
import { Person } from "./types";
import { Listbox } from "./listbox/listbox";
import { useForm } from "react-hook-form";
const people: Person[] = [
{ id: 1, name: "Durward Reynolds", unavailable: false },
{ id: 2, name: "Kenton Towne", unavailable: false },
{ id: 3, name: "Therese Wunsch", unavailable: false },
{ id: 4, name: "Benedict Kessler", unavailable: true },
@bradfitz
bradfitz / sqlplay.go
Created June 23, 2021 17:23
sqlplay.go
package main
import (
"database/sql"
"flag"
"fmt"
"html"
"io"
"io/ioutil"
"log"
@shoui520
shoui520 / readmore.md
Last active May 3, 2024 19:56
Chinese Yomichan Setup

Yomichan setup for Chinese

https://learnjapanese.moe

Yomichan is a browser extension created for Japanese which enables its users to quickly and efficiently look up words on a webpage.
While it is made for Japanese, it is possible to use it for other languages, including Chinese.

Getting Yomichan

Yomichan is available for both Chromium and Firefox based browsers. You can find the respective versions below.

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 17, 2024 03:34
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@yoching
yoching / FunctionalViewStyle2.swift
Last active June 5, 2020 04:28
Functional View Styling using `callAsFunction`
import UIKit
struct Style<View: UIView> {
let apply: (View) -> View
// from swift 5.2
func callAsFunction(_ view: View) -> View {
apply(view)
}
}
import Combine
import UIKit
public protocol CombineCompatible {}
// MARK: - UIControl
public extension UIControl {
final class Subscription<SubscriberType: Subscriber, Control: UIControl>: Combine.Subscription where SubscriberType.Input == Control {
private var subscriber: SubscriberType?
private let input: Control
@OliverCulleyDeLange
OliverCulleyDeLange / README.md
Last active August 2, 2023 14:29
Test LiveData with KoTest and Mockk

Testing ViewModel / LiveData with KoTest (previously Kotlintest) and Mockk

I went round a few houses trying to figure out how best to test ViewModels containing LiveData using Kotlin based testing tools. My main mistakes were trying to use JUnit 5 annotations with KoTest test classes and expecting them to work. The @ExtendWith() annotation is from the org.junit.jupiter.api.extension package. Jupiter is the module used for writing tests, whereas KoTest runs on the JUnit 5 Platform. Very different thing apparently

I came accross this Mockk issue which pointed me towards this write up on how to test live data with JUnit 5. This gave me the code to delegate the live data executor to a custom one which simply executes immedietely.

I've not tested thi

" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'