TL;DR? 👉 Implementation.
So one of the things I've liked about working with Go is that you use multiple return values a lot, with early exits that work as a kind of guard:
func GetUserFromAuth(name string, auth Auth) (error, User) {
---@diagnostic disable: undefined-global | |
------------------- | |
-- EDITOR CONFIG -- | |
------------------- | |
vim.opt.compatible = false | |
vim.opt.tabstop = 2 -- Two spaces for tab | |
vim.opt.softtabstop = 2 | |
vim.opt.shiftwidth = 2 -- Two spaces for indentation |
import type { Stream, Task, Operation, Result } from "./types.ts"; | |
export interface Scope extends Operation<void> { | |
run<T>(operation: () => Operation<T>): Task<T>; | |
close(): Operation<void>; | |
created: Stream<Task<unknown>, void>; | |
enqueued: Stream<Operation<unknown>, void>; | |
dropped: Stream<Operation<unknown>, void>; | |
results: Stream<{task: Task<unknown>, result: Result<unknown>}, void>; | |
} |
TL;DR? 👉 Implementation.
So one of the things I've liked about working with Go is that you use multiple return values a lot, with early exits that work as a kind of guard:
func GetUserFromAuth(name string, auth Auth) (error, User) {
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>*scratch*</title> | |
<style> | |
body { | |
font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace; | |
white-space: pre; |
Now tmux, mosh and iTerm2 support the OSC 52 sequence that enables clipboard sharing. However, there is a trap that prevents them from working together.
Mosh accepts OSC 52 sequences with the c;
option. However, tmux doesn't send that option when it emits OSC 52 sequences, which means you cannot use tmux and mosh together with the default configuration.
You can override the OSC 52 sequence generated by tmux by adding the following line to your tmux.conf.
Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.
$ bean-extract config.py ~/Downloads # the csvs should be in here
#install gdal | |
brew install gdal | |
#convert 1:1 | |
ogr2ogr -f "GeoJSON" file.geojson file.shp | |
#convert loose, higher tolerance in simplify reduce files size and lost data precision | |
ogr2ogr -simplify 0.000001 -f "GeoJSON" file.geojson file.shp |
#!/usr/bin/python | |
# run the script: python git-find-big-files.py <the branch> <file size> | |
# Example use: python git-find-big-files.py fix-remove-files 1000000 (this value equals 1 Megabyte) | |
# the Fix-remove-files specifies the branch that you are cleaning | |
import os, sys | |
def getOutput(cmd): | |
return os.popen(cmd).read() |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |