Skip to content

Instantly share code, notes, and snippets.

View henry40408's full-sized avatar
🌴
Relaxed

Heng-Yi Wu henry40408

🌴
Relaxed
  • Taipei, Taiwan
View GitHub Profile
@henry40408
henry40408 / install.sh
Created April 15, 2024 14:29
Determinate Nix Installer
#!/bin/sh
# shellcheck shell=dash
# If you need an offline install, or you'd prefer to run the binary directly, head to
# https://github.com/DeterminateSystems/nix-installer/releases then pick the version and platform
# most appropriate for your deployment target.
#
# This is just a little script that selects and downloads the right `nix-installer`. It does
# platform detection, downloads the installer, and runs it; that's it.
#
@henry40408
henry40408 / install.sh
Last active April 15, 2024 14:29
install nix (official)
#!/bin/sh
# This script installs the Nix package manager on your system by
# downloading a binary distribution and running its installer script
# (which in turn creates and populates /nix).
{ # Prevent execution if this script was only partially downloaded
oops() {
echo "$0:" "$@" >&2
exit 1
@henry40408
henry40408 / install.sh
Last active August 2, 2023 16:09
Install chezmoi
#!/bin/sh
# chezmoi install script
# contains code from and inspired by
# https://github.com/client9/shlib
# https://github.com/goreleaser/godownloader
set -e
BINDIR="${BINDIR:-./bin}"
@henry40408
henry40408 / README.md
Last active June 4, 2022 12:45
How does Harvester mount volumes from Longhorn to virtual machine?
@henry40408
henry40408 / README.md
Last active May 2, 2022 03:41
How to resolve ld: framework not found Pods_Runner?

How to resolve ld: framework not found Pods_Runner?

Environment

  • MacOS Big Sur (11.1)
  • Flutter 1.22.5 / Dart 2.10.4
  • Xcode Version 12.3 (12C33)
  • Cocoapods 1.10.1

Problem

@henry40408
henry40408 / index.js
Created December 20, 2017 01:04
jiminycricket/pr-review-submit-unassign
// https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L21-L46
let comment = ''
if (config.unassignReviewer) {
const params = context.issue({ body: { assignees: [reviwer] } })
await github.issues.removeAssigneesFromIssue(params)
comment += config.unassignTemplate.replace('{reviwer}', reviwer)
}
@henry40408
henry40408 / index.js
Created December 20, 2017 01:03
jiminycricket/pr-review-submit-unassign
// https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L8-L19
const { github } = context
const userConfig = await context.config('pr_review_submit_unassign.yml')
const config = Object.assign({}, defaultConfig, userConfig)
const { pull_request, review } = context.payload
const pullRequestOwner = pull_request.user.login
const reviwer = review.user.login
@henry40408
henry40408 / index.js
Created December 20, 2017 01:02
henry40408/assign-in-comment
// https://github.com/henry40408/assign-in-comment/blob/master/index.js#L3-L5
module.exports = robot => {
robot.on('pull_request.opened', context => assignInComment(robot, context))
robot.on('pull_request.edited', context => assignInComment(robot, context))
}
@henry40408
henry40408 / index.js
Created December 20, 2017 00:49
jiminycricket/pr-review-submit-unassign
// https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L3-L5
module.exports = robot => {
robot.on('pull_request_review.submitted', assignAfterReviewSubmitted)
}
@henry40408
henry40408 / index.js
Created December 20, 2017 00:37
jiminycricket/pr-review-submit-unassign
// https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js
const defaultConfig = require('./lib/defaultConfig')
module.exports = robot => {
robot.on('pull_request_review.submitted', assignAfterReviewSubmitted)
}
async function assignAfterReviewSubmitted (context) {
const { github } = context