Skip to content

Instantly share code, notes, and snippets.

View lambdalisue's full-sized avatar
🎮

Λlisue (Ali sue・ありすえ) lambdalisue

🎮
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 4, 2024 15:48
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@koshatul
koshatul / README.md
Last active April 29, 2024 17:13
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active April 21, 2024 04:49
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@stkchp
stkchp / get-dslite-aftr-in-asahinet.md
Last active April 8, 2024 05:31
ASAHIネットのDS-Liteの終端(AFTR)を取得するメモ

ASAHIネットのDS-Liteの終端(AFTR)を取得する

ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。

Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。

終端の情報公開について

@kawaz
kawaz / install-pam_tid-and-pam_reattach.sh
Last active March 22, 2024 06:20
macOSの sudo で TouchID が使えるようにする(tmux内の利用も対応)
#!/bin/bash
# Qiita記事 https://qiita.com/kawaz/items/0593163c1c5538a34f6f
set -e
set -o pipefail
# pam_tidの存在チェック(間違えてLinux環境などで実行されたら中断する)
[[ -f /usr/lib/pam/pam_tid.so.2 ]] || exit 1
[[ "${OSTYPE:0:6}" == "darwin" ]] || exit 1
# /etc/pam.d/sudo を念のためターミナルに出力しておく(似非バックアップ)
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active March 19, 2024 17:24 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@voluntas
voluntas / learning-webrtc_2023-05.md
Last active March 16, 2024 15:30
時雨堂 WebRTC 入門 (講師資料) v2023-05

時雨堂 WebRTC 入門 (講師資料) v2023-05

これは時雨堂が開催しているオンラインイベントである WebRTC 入門の 講師用 の資料であり、 参加者用の資料ではありません。

時雨堂 WebRTC 入門 オンラインイベント

概要

ChatGPT がある今、学ぼうと思えば好きなだけ学べる時代がきています。