Skip to content

Instantly share code, notes, and snippets.

View td-shi's full-sized avatar

TD氏 td-shi

  • Near Port
View GitHub Profile
@td-shi
td-shi / data-final-fix.lua
Created January 27, 2020 07:04
Factorio Block spitter attack.
--For 0.13.13 and later there will be layer-10 through layer-15 that can be used.
local projectile_layer = "layer-13"
local suffix = "-blockable"
local function make_projectile_blockable (prototype_name)
local prototype = data.raw.projectile[prototype_name]
if not prototype then
return prototype_name
end
local newname = prototype.name .. "-blockable"
@td-shi
td-shi / air-filtering.cfg
Created January 27, 2020 07:02
Factorio Locale Japanese [Air Filtering Advanced](https://mods.factorio.com/mod/air-filtering-patched) (MOD created by blackmaster1313)
[entity-name]
air-filter-machine-mk1=空気清浄機 癸型
air-filter-machine-mk2=空気清浄機 壬型
air-filter-machine-mk3=空気清浄機 辛型
air-filter-machine-mk4=空気清浄機 庚型
air-filter-machine-mk5=空気清浄機 己型
air-filter-machine-mk6=空気清浄機 戊型
[item-name]
unused-air-filter=エアフィルタ
@td-shi
td-shi / tarot.sh
Created January 27, 2020 07:00
I bought tarot cards, also this script was made.
#!/bin/bash --posix
# -*- coding:utf-8 -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / ulid.sh
Last active May 7, 2024 17:55
ULID on shell script. Universally Unique Lexicographically Sortable Identifier. [ULID](https://github.com/ulid/spec)
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Initialize shell environment =============================================
#set -u # Just stop undefined values.
#set -e # Just stop error.
#set -x # Debug running command.
umask 0022
export LC_ALL=C
export LANG=C