Skip to content

Instantly share code, notes, and snippets.

View appare45's full-sized avatar
:octocat:

appare45

:octocat:
View GitHub Profile
@appare45
appare45 / numerical-analysis.sh
Last active May 30, 2024 03:49
数値計算法の課題をDockerでやる
docker run --rm -p 8888:8888 --name julia -v julia:/opt/julia -v=./works:/home/jovyan/work/works -d jupyter/datascience-notebook jupyter notebook --NotebookApp.token='' --NotebookApp.password=''
じっけい 実計 名詞
じっけい 実行計画書 短縮よみ
ほんき 本企 名詞
すてかん ステ管 名詞
じついじん 実委人 名詞
こうせん 広宣 名詞
やさい 夜祭 接頭語
やさい 夜祭 名詞
きだんれん 企団連 名詞
ぷれそう プレ雙 名詞
70817 --- Called exec() ---
70817 __sigsetjmp(0x564d116c04e0, 0, 0x7ffc9a6d1c68, 0x564d116acaf8) = 0
70817 open("/dev/tty", 2050, 013006331611) = -1
70817 fileno(0x7ff26cd55a80) = 0
70817 ttyname(0) = nil
70817 setlocale(LC_ALL, "") = "C.UTF-8"
70817 strlen("C.UTF-8") = 7
70817 malloc(8) = 0x564d1338ecf0
70817 strcpy(0x564d1338ecf0, "C.UTF-8") = 0x564d1338ecf0
70817 bindtextdomain("bash", "/usr/share/locale") = "/usr/share/locale"
execve("/usr/sbin/ip", ["ip", "netns", "add", "ns1"], 0x7ffdcebe42b0 /* 14 vars */) = 0
brk(NULL) = 0x561cddd59000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe920c8820) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f65c7e03000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=16355, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16355, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f65c7dff000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libbpf.so.0", O_RDONLY|O_CLOEXEC) = 3
execve("./target/debug/socker", ["./target/debug/socker", "clone"], 0x7ffd4e1a6b20 /* 14 vars */) = 0
brk(NULL) = 0x564abc52b000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffcec0ef750) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3e00f99000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=16355, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16355, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3e00f95000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
@appare45
appare45 / main.rs
Created December 13, 2023 04:54
get list of NIC
use nix::ifaddrs;
fn main() {
println!("Hello, world!");
let addrs = nix::ifaddrs::getifaddrs().unwrap();
for ifaddr in addrs {
match ifaddr.address {
Some(address) => {
println!("interface {} address {}", ifaddr.interface_name, address);
}
None => {
{
"emulators": {
"auth": {
"port": 9099
},
"ui": {
"enabled": true,
"port": 4040
}
}

Keybase proof

I hereby claim:

  • I am appare45 on github.
  • I am appare45 (https://keybase.io/appare45) on keybase.
  • I have a public key whose fingerprint is 0275 3A78 685E FB23 2605 2427 B38E 1A3C FE69 5D28

To claim this, I am signing this object:

@appare45
appare45 / path-resolve.js
Created January 24, 2021 14:51
Resolve the path to previewing locally
const args = process.argv.slice(2);
let targetPath = args[0];
if (args[0] === undefined) {
targetPath = '.'
}
targetPath = targetPath.trim();
targetPath = targetPath.replace(/^\./, "./");
targetPath = targetPath.replace(/^\.\//, "/");
const path = require("path");