Skip to content

Instantly share code, notes, and snippets.

View LumaKernel's full-sized avatar
🛌
.o0○

Luma LumaKernel

🛌
.o0○
View GitHub Profile
@greymd
greymd / teip2.md
Last active May 30, 2023 16:10
teip v2.0 でヤバい機能がついた件

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

teip コマンド に関するお話

まとめ

  1. teip v2.0 に新機能:マッチオフロード機能
  • テープの穴をあける行の指定に外部コマンドが使えるようになった
  1. あるコマンドの抽出範囲のみを、範囲外は残したまま、別のコマンドで編集可能になる
@hasegawayosuke
hasegawayosuke / async_rex.js
Created February 23, 2022 08:27
Asynchronous RegExp for node.js with termination
const { Worker, isMainThread, workerData, parentPort } = require('worker_threads')
if (isMainThread) {
class AsyncRex {
constructor (pattern, flags) {
if (pattern instanceof RegExp) {
this.source = pattern.source
this.flags = pattern.flags
} else if (typeof pattern === 'string') {
this.source = pattern
@qnighy
qnighy / juxtaposition-application.md
Created February 22, 2022 13:18
並置による関数適用に関する所感

並置による関数適用

並置による関数適用の善し悪しについて盛り上っているので、自分の意見を表明しておく。以下の2本立て。

  • 純粋に構文論的な議論 (構文拡張の余地を残す)
  • 意味論との関係での議論 (副作用の表示)

先に結論だけ書くと、私はどちらかといえば括弧による関数適用のほうが好みです。

そもそも並置による関数適用とは

@sindresorhus
sindresorhus / esm-package.md
Last active October 21, 2025 13:33
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.

deno のコードを読んだメモ。

そこまで大きなプロジェクトでもないので、rust と cpp そこまで習熟してなくても読めるだろうという気持ち。

ブートプロセス

https://denolib.gitbook.io/guide/installing-deno

起動プロセスっぽいところ。

@mbinna
mbinna / effective_modern_cmake.md
Last active October 15, 2025 00:43
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@cstuncsik
cstuncsik / useful-git-aliases.sh
Created February 27, 2017 08:34
Useful git aliases
# git please
# checks that your local copy of the ref that you’re overwriting is up-to-date before overwriting it.
# This indicates that you’ve at least fetched the changes you’re about to stomp.
git config --global alias.please 'push --force-with-lease'
# git commend
# quietly tacks any staged files onto the last commit you created, re-using your existing commit message
git config --global alias.commend 'commit --amend --no-edit'
# git it
@danihodovic
danihodovic / main.tf
Created January 8, 2017 20:48
Terraform - static site using S3, Cloudfront and Route53
variable "aws_region" {
default = "eu-west-1"
}
variable "domain" {
default = "my_domain"
}
provider "aws" {
region = "${var.aws_region}"
@ar-pa
ar-pa / BigInt.cpp
Last active August 11, 2025 06:54
bignum class for C++
// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;
@OnlyInAmerica
OnlyInAmerica / make-mega-adblock-hostsfile.sh
Last active September 24, 2024 14:40
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Modified Pi-hole script to generate a generic hosts file
# for use with dnsmasq's addn-hosts configuration
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh
# The Pi-hole now blocks over 120,000 ad domains
# Address to send ads to (the RPi)
piholeIP="192.168.1.1"
outlist='./final_blocklist.txt'