Skip to content

Instantly share code, notes, and snippets.

@tueda
tueda / x
Last active May 21, 2024 01:56
Running a development version of FORM. #bin #sh #launcher #dev #form
#!/bin/bash
#
# Usage:
# ./x [update]
# [4.1.0|4.2.0|4.2.1|4.3.0|4.3.1]
# [check|time [-n <times>]]
# [coverage|gprof|valgrind [<valgrind options>]|helgrind|drd|sanitize]
# [form|vorm|tform|tvorm|parform|parvorm]
# [args...]
#
var args = WScript.Arguments;
if (args.length !== 1) {
WScript.Echo("Please drag and drop an Excel file onto this script.");
WScript.Quit();
}
var filePath = args(0);
try {
On Highfirst;
*--#[ jodavies_include :
* Paste denexpand.prc
* Expand a "den" function DEN in the variable EP. This is useful in cases
* where we have isolated the dependence on the EP symbol, and cannot merge
* everything into a common PolyRatFun without exceeding MaxTermSize.
@tueda
tueda / docker_ip_range.md
Last active May 16, 2024 02:55
Dockerとイントラネットが衝突したときの対処法 #docker #config
ip addr
docker network inspect bridge

Workaround

/etc/docker/daemon.json

{
#!/bin/sh
for f in "$@"; do
git blame -e "$f"
done | awk -F'<' '{print $2}' | awk -F'>' '{print $1}' | sort | uniq -c | sort -nr
@tueda
tueda / tarb
Last active April 23, 2024 02:18
A script for creating tarballs. #bin #sh
#!/bin/bash
#
# @file tarb
#
# Creates a tarball of the current directory.
#
# Examples:
# $ cd tarb-test
# $ tarb # create ../tarb-test.tar.gz
# $ tarb -j # create ../tarb-test.tar.bz2
@tueda
tueda / PhysicsCollections.md
Last active April 7, 2024 00:32
A biased list of pedagogical physics resources, essential papers, reviews and more.
@tueda
tueda / tetris.py
Last active April 1, 2024 03:15
A simple tetris-ish game in Python with the curses library. #python #game #curses
# テトリスもどき(Replitのコンソールで動作する)
# 左/右/下: 移動
# (半角)スペース: 回転
import curses
import random
import time
def main(stdscr):