Skip to content

Instantly share code, notes, and snippets.

@rambii
rambii / german-iso-3166.csv
Last active October 23, 2023 08:58 — forked from walterrenner/german-iso-3166.csv
German ISO-3166 Country Codes CSV (deutsche Ländercodes Alpha-2)
AF Afghanistan
EG Ägypten
AX Åland Islands
AL Albanien
DZ Algerien
AD Andorra
AO Angola
AI Anguilla
AQ Antarktis
AG Antigua und Barbuda
@LinusBorg
LinusBorg / 0-vue3-typescript-caveats.md
Last active November 1, 2021 08:35
Vue 3 Typescript Caveats

About this collection

This gist is a work in progress. It's goal is to collect information about possible pitfalls when using Vue 3's proxy-base reactivity and Typescript, including solutions/remedies/workarounds.

Ultimately, the goal is to turn this into a part of the Vue documentation.

TOC

  1. Leaking this from the constructor, i.e. in async operations.
  2. ref()/reactive() unwrapping loses private fields type information
@CatsMiaow
CatsMiaow / main.ts
Created June 12, 2020 05:26
Comlink example for Node.js with TypeScript
/**
* https://github.com/GoogleChromeLabs/comlink/blob/master/docs/examples/06-node-example/main.mjs
* https://github.com/GoogleChromeLabs/comlink/issues/476#issuecomment-642765445
* esModuleInterop to true in tsconfig.json compilerOptions.
*/
import { Worker } from 'worker_threads';
import * as comlink from 'comlink';
import nodeEndpoint from 'comlink/dist/umd/node-adapter';
import { cpus } from 'os';
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active May 18, 2024 14:43
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@malteos
malteos / german-iso-3166.csv
Last active September 27, 2023 09:23
German ISO-3166 Country Codes CSV (deutsche Ländercodes)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
AF Afghanistan
EG Ägypten
AL Albanien
DZ Algerien
AD Andorra
AO Angola
AI Anguilla
AQ Antarktis
AG Antigua und Barbuda
GQ Äquatorial Guinea
@JonasGroeger
JonasGroeger / build.gradle
Last active January 23, 2024 07:55
Gradle: Read git commit hash.
def getCheckedOutGitCommitHash() {
def gitFolder = "$projectDir/.git/"
def takeFromHash = 12
/*
* '.git/HEAD' contains either
* in case of detached head: the currently checked out commit hash
* otherwise: a reference to a file containing the current commit hash
*/
def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD
def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd
@lymanlai
lymanlai / sftp-ubuntu.md
Created June 28, 2012 02:01 — forked from joshellington/sftp-ubuntu.md
Basic tutorial for creating a SFTP-only user on Ubuntu 9.04 and greater

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.

Directions

  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer
    

ChrootDirectory %h