Skip to content

Instantly share code, notes, and snippets.

View Himenon's full-sized avatar
๐Ÿ˜‡
Working from home

K.Himeno Himenon

๐Ÿ˜‡
Working from home
View GitHub Profile
@greymd
greymd / sudoๆ–ฐไธ€.md
Last active July 4, 2025 12:31
sudoๆ–ฐไธ€

ใ€€ใ‚ชใƒฌใฏ้ซ˜ๆ ก็”Ÿใ‚ทใ‚งใƒซ่Šธไบบ sudo ๆ–ฐไธ€ใ€‚ๅนผ้ฆดๆŸ“ใงๅŒ็ดš็”Ÿใฎ more ๅˆฉ่˜ญใจ้Šๅœ’ๅœฐใซ้Šใณใซ่กŒใฃใฆใ€้ป’ใšใใ‚ใฎ็”ทใฎๆ€ชใ—ใ’ใช rm -rf / ็พๅ ดใ‚’็›ฎๆ’ƒใ—ใŸใ€‚็ซฏๆœซใ‚’ใฟใ‚‹ใฎใซๅคขไธญใซใชใฃใฆใ„ใŸไฟบใฏใ€่ƒŒๅพŒใ‹ใ‚‰่ฟ‘ใฅใ„ใฆใใŸใ‚‚ใ†๏ผ‘ไบบใฎ --no-preserve-root ใ‚ชใƒ—ใ‚ทใƒงใƒณใซๆฐ—ใฅใ‹ใชใ‹ใฃใŸใ€‚ ไฟบใฏใใฎ็”ทใซๆฏ’่–ฌใ‚’้ฃฒใพใ•ใ‚Œใ€็›ฎใŒ่ฆšใ‚ใŸใ‚‰ใƒปใƒปใƒป OS ใฎใƒ—ใƒชใ‚คใƒณใ‚นใƒˆใƒผใƒซใ‹ใ‚‰้™คใ‹ใ‚Œใฆใ—ใพใฃใฆใ„ใŸ๏ผ

ใ€Ž sudo ใŒใพใ  $PATH ใซๆฎ‹ใฃใฆใ„ใ‚‹ใจๅฅดใ‚‰ใซใƒใƒฌใŸใ‚‰ใ€ใพใŸๅ‘ฝใ‚’็‹™ใ‚ใ‚Œใ€ไป–ใฎใ‚ณใƒžใƒณใƒ‰ใซใ‚‚ๅฑๅฎณใŒๅŠใถใ€

ใ€€ไธŠ็”ฐๅšๅฃซใฎๅŠฉ่จ€ใงๆญฃไฝ“ใ‚’้š ใ™ใ“ใจใซใ—ใŸไฟบใฏใ€ which ใซๅๅ‰ใ‚’่žใ‹ใ‚Œใฆใ€ใจใฃใ•ใซใ€Žgnuplotใ€ใจๅไน—ใ‚Šใ€ๅฅดใ‚‰ใฎๆƒ…ๅ ฑใ‚’ใคใ‹ใ‚€ใŸใ‚ใซใ€็ˆถ่ฆชใŒใ‚ทใ‚งใƒซ่Šธไบบใ‚’ใ‚„ใฃใฆใ„ใ‚‹่˜ญใฎ $HOME ใซ่ปขใŒใ‚Š่พผใ‚“ใ ใ€‚ใจใ“ใ‚ใŒใ€ใ“ใฎใŠใฃใกใ‚ƒใ‚“ใƒปใƒปใƒปใจใ‚“ใ ใƒ˜ใƒœใ‚ทใ‚งใƒซ่Šธไบบใงใ€่ฆ‹ใ‹ใญใŸไฟบใฏใŠใฃใกใ‚ƒใ‚“ใซใชใ‚Šใ‹ใ‚ใ‚Šใ€ๆŒใกๅ‰ใฎๆจฉ้™ๆ˜‡ๆ ผ่ƒฝๅŠ›ใงใ€ๆฌกใ€…ใจ้›ฃใ‚ฟใ‚นใ‚ฏใ‚’่งฃๆฑบใ—ใฆใใŸใ€‚ใŠใ‹ใ’ใงใ€ใŠใฃใกใ‚ƒใ‚“ใฏไปŠใ‚„ไธ–้–“ใซๅใ‚’็Ÿฅใ‚‰ใ‚ŒใŸๅใ‚จใƒณใ‚ธใƒ‹ใ‚ขใ€ไฟบใฏใจใ„ใˆใฐใ‚ทใ‚งใƒซ่Šธ bot ใฎใŠใ‚‚ใกใ‚ƒใซ้€†ๆˆปใ‚Šใ€‚ใ‚ฏใƒฉใ‚นใƒกใƒผใƒˆใฎ convert ใ‚„ ojichatใ‚„ textimg ใซใŠ็ตตใ‹ใใ‚ณใƒžใƒณใƒ‰ใจ่ชค่งฃใ•ใ‚Œๅฐ‘ๅนดใƒฏใƒณใƒฉใ‚คใƒŠใƒผใŠ็ตตใ‹ใๅ›ฃใ‚’็ตๆˆใ•ใ›ใ‚‰ใ‚Œใ‚‹ๅง‹ๆœซใ€‚

ใ€€ใงใฏใ“ใ“ใงใ€ๅšๅฃซใŒไฝœใฃใฆใใ‚ŒใŸใƒกใ‚ซใ‚’็ดนไป‹ใ—ใ‚ˆใ†ใ€‚ๆœ€ๅˆใฏๆ™‚่จˆๅž‹้บป้…” kill ใ€‚ใตใŸใซใคใ„ใŸ็…งๆบ–ๅ™จใซใ‚ใ‚ใ›ใฆใ‚จใƒณใ‚ฟใƒผใ‚’ๆŠผใ›ใฐใ€้บป้…”ใ‚ทใ‚ฐใƒŠใƒซใŒ้ฃ›ใณๅ‡บใ—ใ€ใƒ—ใƒญใ‚ปใ‚นใ‚’็žฌๆ™‚ใซ sleep ใ•ใ›ใ‚‹ใ“ใจใŒใงใใ‚‹ใ€‚ ๆฌกใซใ€่ถใƒใ‚ฏใ‚ฟใ‚คๅž‹ banner ใ€‚่ฃใซใคใ„ใฆใ„ใ‚‹ใƒ€ใ‚คใƒคใƒซใ‚’่ชฟๆ•ดใ™ใ‚Œใฐใ€ใ‚ใ‚Šใจใ‚ใ‚‰ใ‚†ใ‚‹ๅคงใใ•ใฎใƒกใƒƒใ‚ปใƒผใ‚ธใ‚’ๆจ™ๆบ–ๅ‡บๅŠ›ใงใใ‚‹ใ€‚ๅฟ…ๆฎบใฎใ‚ขใ‚คใƒ†ใƒ ใชใ‚‰ fork ๅŠ›ๅข—ๅผทใ‚ทใƒฅใƒผใ‚บใ€‚้›ปๆฐ—ใจ็ฃๅŠ›ใง่ถณใ‚’ๅˆบๆฟ€ใ—ใ€ :(){ :|:& };: ใงใƒ—ใƒญใ‚ปใ‚นใƒ†ใƒผใƒ–

@azu
azu / TypeScriptใฎ่จญๅฎšใฎ่‰ฏใ—ๆ‚ชใ—.md
Last active July 1, 2025 02:49
TypeScriptใฎ่จญๅฎšใฎ่‰ฏใ—ๆ‚ชใ—

tsconfig.json ใฎ่จญๅฎšใซใคใ„ใฆใฎใƒกใƒขๆ›ธใใงใ™ใ€‚

Node.jsใฎใƒใƒผใ‚ธใƒงใƒณใ”ใจใฎ่จญๅฎš

target ใฏ ๅค‰ๆ›ๅพŒใฎใ‚ณใƒผใƒ‰ใฎECMAScriptใƒใƒผใ‚ธใƒงใƒณใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ ใŸใจใˆใฐใ€Node.js 14ใฏES2020ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใ‚‹ใ€‚ใใฎใŸใ‚ใ€Node.js 14ๅ‘ใ‘ใฎใ‚ณใƒผใƒ‰(ใ‚ตใƒผใƒใชใฉ)ใชใ‚‰target: "ES2020"ใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใ“ใจใงใ€ไฝ™่จˆใชTranspileใŒ็œใ‹ใ‚Œใฆใฆใ‚ณใƒผใƒ‰ใ‚ตใ‚คใ‚บใ‚„ๅฎŸ่กŒๆ™‚้–“ใŒๆœ€้ฉๅŒ–ใ•ใ‚Œใ‚‹ใ€‚

@sindresorhus
sindresorhus / esm-package.md
Last active July 23, 2025 15:49
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.
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active July 22, 2025 08:57
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ยฉ๏ธ2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@nokute78
nokute78 / usecase_of_filter_lua.md
Last active January 20, 2022 01:02
The use case of lua_filter of fluent-bit

ๆฆ‚่ฆ

https://fluentbit.io/

fluent-bit ใซใฏ Lua ใ‚นใ‚ฏใƒชใƒ—ใƒˆใงfilterใงใใ‚‹ใƒ—ใƒฉใ‚ฐใ‚คใƒณใŒใ‚ใ‚Šใพใ™ใ€‚ ใ“ใ‚Œใ‚’ไฝฟใ†ใจใ€ไธ‹่จ˜ใฎใ‚ˆใ†ใชใ“ใจใŒใงใใพใ™ใ€‚

@astoilkov
astoilkov / readme.md
Last active November 16, 2024 12:52
Async Operations with useReducer Hook

Async Operations with useReducer Hook

9 March, 2019

We were discussing with @erusev what we can do with async operation when using useReducer() in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer(). The problem we are facing and don't know how to solve is async operations.

In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.

Problem

@kemsakurai
kemsakurai / Google Apps Script ใฎ client-side API ใฎTypeScript ๅž‹ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซ.md
Created February 17, 2019 14:44
Google Apps Script ใฎ client-side API ใฎTypeScript ๅž‹ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซ

clasp ใง Google Apps Script ใ‚’ๆ›ธใ„ใฆใ„ใ‚‹ใŒใ€client-side API ใฎ TypeScript ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซใŒ่ฆ‹ใ‚ใŸใ‚‰ใšใ€ๆŽขใ—ใŸใฎใงๆŽขใ—ใŸ็ตๆžœใ‚’่จ˜่ผ‰ใ™ใ‚‹ใ€‚


ใ‚ชใƒ•ใ‚ฃใ‚ทใƒฃใƒซใช TypeScript ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซ

ๅ…ฌๅผใฎ TypeScript ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซใฏใชใ„ใจๆ€ใ†ใ€‚
ๆŽขใ—ใŸใŒ่ฆ‹ใคใ‹ใ‚‰ใชใ‹ใฃใŸใ€‚


ๅ€‹ไบบใŒไฝœๆˆใ—ใฆใ„ใ‚‹ ๅฎš็พฉใƒ•ใ‚กใ‚คใƒซ

Gist ใซ UP ใ•ใ‚Œใฆใ„ใŸใ€‚

@dmail
dmail / url.js
Last active January 5, 2024 11:09
URL parts naming. Inspired from web browsers API (new URL(), window.location) and rfc3986.
/*
href
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
origin โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ authority โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ host resource
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”‚ hostname โ”‚ pathname โ”‚ โ”‚
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@shunirr
shunirr / criminal_jc.md
Last active June 21, 2025 08:07
ๅฅณๅญไธญๅญฆ็”Ÿใƒใ‚ฑใƒƒใƒˆ่ฉๆฌบไบ‹ไปถ

criminal_jc