Skip to content

Instantly share code, notes, and snippets.

View buzztaiki's full-sized avatar

Taiki Sugawara buzztaiki

View GitHub Profile
@sheepla
sheepla / ojosudo
Last active February 9, 2024 15:35
sudo but for お嬢様
#!/bin/sh
echo -e "貴方は領主様から通常の講習を受けたはずですわ。
これは通常、以下の3点に要約されますの:
#1) 市民の皆様のプライバシーを尊重すること。
#2) タイプする前に考えること。
#3) そしてノブレス・オブリージュを肝に銘じておくことですわ。
"
exec sudo "${@}"
@LukeMathWalker
LukeMathWalker / audit.yml
Last active May 9, 2024 16:07
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@laughinghan
laughinghan / Every possible TypeScript type.md
Last active May 8, 2024 11:14
Diagram of every possible TypeScript type

Hasse diagram of every possible TypeScript type

  • any: magic, ill-behaved type that acts like a combination of never (the proper [bottom type]) and unknown (the proper [top type])
    • Anything except never is assignable to any, and any is assignable to anything at all.
    • Identities: any & AnyTypeExpression = any, any | AnyTypeExpression = any
    • Key TypeScript feature that allows for [gradual typing].
  • unknown: proper, well-behaved [top type]
    • Anything at all is assignable to unknown. unknown is only assignable to itself (unknown) and any.
    • Identities: unknown & AnyTypeExpression = AnyTypeExpression, unknown | AnyTypeExpression = unknown
  • Prefer over any whenever possible. Anywhere in well-typed code you're tempted to use any, you probably want unknown.
@shunirr
shunirr / criminal_jc.md
Last active February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@okapies
okapies / mastodon-ostatus.md
Last active September 5, 2021 11:39
Mastodon OStatus API の叩き方

Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。

host-meta

Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
@voluntas
voluntas / naze_erlang.rst
Last active October 31, 2023 03:33
なぜ Erlang/OTP を使い続けるのか
@mala
mala / seccon2013.md
Last active September 29, 2016 02:32
SECCON2013 北陸大会の前日勉強会の資料 スライド形式のはこちら https://speakerdeck.com/mala/seccon2013-slide

スマートフォンのセキュリティについて

ma.la


自己紹介

http://ma.la

@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
#!/bin/bash
#
# Init file for daemonized Skype service
#
### BEGIN INIT INFO
# Provides: skype
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6