Skip to content

Instantly share code, notes, and snippets.

@weihanglo
weihanglo / rustconf-2019-1.md
Last active June 11, 2024 06:56
RustConf 2019 雲參訪錄(1)

RustConf 2019 雲參訪錄(1)

RustConf 是 Rust 社群年度最重要的研討會之一,從 [Rust 在 2015 年 1.0 版正式發布][rust-1.0]之後,[2016][2016]、[2017][2017]、[2018][2018] 連續三年都在美國舉辦,今年當然不例外,八月底在 NBA 球迷稱作 Rip City 的波特蘭舉行。由於歷史悠久,加上 Rust 社群在美國較為活躍,許多 Rust Core Team 成員都會共襄盛舉,這場研討會是 Rust 開發者絕對不能錯過的盛事。

RustConf 歷年來皆由 [Tilde Inc.][tilde] 旗下的 [Skylight][skylight] 主辦,Skylight 是一個 Rails profiler in production 的解決方案,產品中關鍵的模組用了不少 Rust。

好了,介紹完背景,這篇文章主要是紀錄小弟我「在 YouTube 上」觀看演講的心得分享,當然,RustConf 除了主要的演講軌,還有不少場邊工作坊等小活動,這就留給看倌明年到實地考察啦!

@dataday
dataday / credentials-management.md
Last active October 22, 2023 06:47
docker + docker credential helpers + pass + gpg2 + coffee

Credentials Management

This guide describes setting out a credential storage mechanism that is shared between the root account, aka releasr, and jenkins account. It intends to support and persist access credentials that are needed when authenticating with external services, primarily Docker Hub, for users wishing to access remote Docker images as part of their containerised services.

The following diagram aims to describe the control flow this setup intends to support.

Credentials Management

This guide is a first, and a tad complicated sorry, pass at setting this up. It got us over the line for a couple of uses cases as well as working with automated build jobs.

@cristovao-trevisan
cristovao-trevisan / 1 - .zshrc
Last active November 17, 2024 10:30
zsh configuration using zinit
# # SDKMAN
# export SDKMAN_DIR="$HOME/.sdkman"
# [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# GO
export PATH="$PATH:$HOME/go/bin"
# ZINIT
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
@fnky
fnky / ANSI.md
Last active November 18, 2024 06:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@iFwu
iFwu / search-selected-text.js
Last active May 23, 2019 11:08
Seach Selected Text in JavaScript Mac Automation Scripting
function validURL(str) {
var pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i'
); // fragment locator
@samthor
samthor / code.js
Last active July 18, 2022 11:02
Async cancellable promises
// nb. This code is available in an ES module of Promise helpers, here:
// https://github.com/samthor/promises
// symbol returned to indicate that a call was cancelled
export const takeoverSymbol = Symbol('takeover');
/**
* Accepts a generator function, which yields Promises, and converts it to an async function
* that cancels any previous calls.
*/
@kolodny
kolodny / post.md
Created April 17, 2018 13:40
Swift State Machine

Fully Exhaustive Swift State Machine

The following is a nice Swift pattern to make a vanilla Swift state machine:

class Machine {
  enum State {
    case foo
    case bar(String)
    case baz(Int)
@chroming
chroming / alipay_to_wiz.py
Created October 3, 2017 11:09
支付宝账单转MoneyWiz
# -*- coding:utf-8 -*-
import csv
csv_file = "~/1.csv"
new_file = "~/2.csv"
row_one = ["账户","转账","描述","交易对象","分类","日期","时间","金额","支票号码"]
@Geoff-Ford
Geoff-Ford / composing-software.md
Last active November 10, 2024 09:04
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

Uninstall brew package and dependencies

Remove package's dependencies (does not remove package):

brew deps [FORMULA] | xargs brew remove --ignore-dependencies

Remove package: