Skip to content

Instantly share code, notes, and snippets.

View unlimish's full-sized avatar
🍼
𝒯𝑒𝓃𝒹𝑒𝓇 𝒾𝓈 𝓉𝒽𝑒 𝓌𝑜𝓇𝓁𝒹

Riley unlimish

🍼
𝒯𝑒𝓃𝒹𝑒𝓇 𝒾𝓈 𝓉𝒽𝑒 𝓌𝑜𝓇𝓁𝒹
View GitHub Profile
@puhitaku
puhitaku / main.py
Created January 26, 2023 14:05
Fetch available icecreams from Tokaido Shinkansen and Sanyo Shinkansen
import requests as req
from bs4 import BeautifulSoup
def scrape_tokai() -> list[tuple]:
res = req.get('https://www.jr-cp.co.jp/wp-json/wp/v2/services?per_page=100&services_category=21')
j = res.json()
return [(item['title']['rendered'], item['data']['price_services']) for item in res.json()]

この一覧は 4f247a078 時点のものです。

CODE UUID(s) Desc
- 15348ddd-432d-49c2-8a5a-8069753becff (packages/backend/src/server/api/GetterService.ts#L49) ユーザーが存在しない。
- 15a018eb-58e5-4da1-93be-330fcc5e4e1a (packages/backend/src/core/NotePiningService.ts#L65) ピン留めできる投稿数の上限に達している。
- 17447091-ce07-46dd-b331-c1fd4f15b1e7 (packages/backend/src/core/UserFollowingService.ts#L541) フォローリクエストが存在しない。
- 23f0cf4e-59a3-4276-a91d-61a5891c1514 (packages/backend/src/core/NotePiningService.ts#L69) すでに指定された投稿をピン留めしている。
- 2d16e51c-00
@kurobee-dev
kurobee-dev / map.sh
Last active March 8, 2024 14:47
21.02.RC2_map.sh Portset範囲指定カスタム
#!/bin/sh
# map.sh - IPv4-in-IPv6 tunnel backend
#
# Author: Steven Barth <cyrus@openwrt.org>
# Copyright (c) 2014 cisco Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation
#
@nori26
nori26 / add.sh
Last active May 14, 2021 06:28
automatically add prototypes to header with suitable tabs for 42 norminette
NAME_H="libunit.h"
prot=$(find . -type d -name libft -prune -o -type f -name '*.c' | xargs cat | sed -e '/^[a-zA-Z].*)$/!d' -e '/^static/d' -e "s/)$/);/g")
TABS=$(echo "${prot}" | awk '{sub("[\t ].*", "");print length($0)}' | sort -nr | head -n 1 | xargs -I{} expr {} / 4 + 1)
header="$(sed -e "/^[a-zA-Z][a-zA-Z_0-9]*.*);$/d" -e '/#endif/d' -e '/^$/d' ${NAME_H})
$(echo "${prot}" | awk -v tabs=${TABS} '{s=$0; sub("[\t ].*", ""); l=tabs - int(length($0) / 4); t="";for(i=0;i<l;i++){t=t "\t"};sub("[\t ][\t ]*", t, s); print s}')
#endif"
anonymous
anonymous / firewall.user
Created May 29, 2017 18:22
OpenWrt map-e (JPNE v6plus) において、割当ポート240個をちゃんと使わせるための設定。
## /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
;KC_LANG1 -> 変換、KC_LANG2 -> 無変換
sc071 Up::Send,{vk1Dsc07B}
sc072 Up::Send,{vk1Csc079}
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active March 14, 2024 22:49
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@hashrock
hashrock / diag.md
Last active February 26, 2024 05:51
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など
<?xml version="1.0" encoding="UTF-8" ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<b:skin></b:skin>
</head>
<body>
<b:section id='mainSection'>
<b:widget id="Blog1" type="Blog">
<b:includable id="main">
@koseki
koseki / vbox-ch10-1.md
Last active September 14, 2021 01:18
VirtualBox はどこにファイルを保存するか

VirtualBox マニュアルメモ - 10.1. VirutalBox はどこにファイルを保存するか

10.1. Where VirtualBox stores its files

In VirtualBox, a virtual machine and its settings are described in a virtual machine settings file in XML format.

VM の設定は XML 形式で書いてある。