Skip to content

Instantly share code, notes, and snippets.

View 4513ECHO's full-sized avatar

Hibiki 4513ECHO

View GitHub Profile
@kawarimidoll
kawarimidoll / invite_history.ts
Last active July 9, 2023 11:45
Bluesky invite code history checker
// deno run --allow-net=bsky.social invite_history.ts
import AtprotoAPI from "npm:@atproto/api";
const { BskyAgent } = AtprotoAPI;
const service = "https://bsky.social";
const agent = new BskyAgent({ service });
const identifier = "YOUR_BLUESKY_IDENTIFIER"; // did or handle
const password = "YOUR_BLUESKY_PASSWORD"; // app-password is available
@sheepla
sheepla / ojosudo
Last active February 9, 2024 15:35
sudo but for お嬢様
#!/bin/sh
echo -e "貴方は領主様から通常の講習を受けたはずですわ。
これは通常、以下の3点に要約されますの:
#1) 市民の皆様のプライバシーを尊重すること。
#2) タイプする前に考えること。
#3) そしてノブレス・オブリージュを肝に銘じておくことですわ。
"
exec sudo "${@}"
@smjonas
smjonas / inc_rename.lua
Last active March 1, 2023 14:45
Incremental LSP rename command based on Neovim's command-preview feature
-- Usage: type :IncrementalRename <new_name> while your cursor is placed above an identifier (LSP must be enabled)
-- Update: this gist will no longer be updated since this command has been turned into a plugin!
-- You can find the plugin here: https://github.com/smjonas/inc-rename.nvim
local state = {
added_lines = false,
orig_lines = {},
lsp_positions = {},
}
@greymd
greymd / teip2.md
Last active May 30, 2023 16:10
teip v2.0 でヤバい機能がついた件

teip v2.0 でヤバい機能がついた件

teip コマンド に関するお話

まとめ

  1. teip v2.0 に新機能:マッチオフロード機能
  • テープの穴をあける行の指定に外部コマンドが使えるようになった
  1. あるコマンドの抽出範囲のみを、範囲外は残したまま、別のコマンドで編集可能になる
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active June 27, 2024 10:49
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@greymd
greymd / sudo新一.md
Last active June 28, 2024 00:26
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:&amp; };: でプロセステーブ

@sevenc-nanashi
sevenc-nanashi / main.rb
Last active December 14, 2021 12:28
GitHub RSS widget
r = HttpRequest.get("https://github.com/user-name-here.private.atom?token=Y0urT0k3nH3re")
exit unless r.success?
pattern = <<'EOS'.chomp
<entry>
<id>tag:github\.com,2008:(?<eventname>.+)/(?<eventid>.+)</id>
<published>(?<published>.+)</published>
<updated>(?<updated>.+)</updated>
<link type="text/html" rel="alternate" href="(?<link>.+)"/>
<title type="html">(?<title>.+)</title>
<author>
-- =============================================================================
-- lightline to lualine theme converter
-- Author: shadman
-- License: MIT License
-- =============================================================================
-- Instructions
-- 1. Source this file in neovim with lightline installed
-- 2. execute :lua light2lualine_theme_converter('theme_name')
@euske
euske / are-you-an-expert.md
Last active January 27, 2022 10:14
Japanese Translation of "Are You An Expert?" by Jeff Atwood

あなたは専門家か? (Are You An Expert?)

(Original article: https://blog.codinghorror.com/are-you-an-expert/ )

ぼくは権威というものが嫌いらしい。 まず自分自身の過去から始めよう。

ぼくは、人々からアマチュア仲間としてではなく、 何らかの専門家や権威だとみなされることがひどく嫌いである。

@Phroneris
Phroneris / howGithubMarkdownDetailsWork.md
Last active June 17, 2024 05:41
GitHubのMarkdownで折りたたみ記法の中身を整形させる方法

どうやら</summary>後の空行以降から整形される。

記述

違いは</summary>後の空行だけ。

<details>
<summary>これは中身が整形されない</summary>
1. 野菜**A**の皮を剥く。
2. 乱切りにする。