Skip to content

Instantly share code, notes, and snippets.

View HimaJyun's full-sized avatar

HimaJyun HimaJyun

View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: syncramdisk
# Required-Start: $local_fs rsyncd
# Required-Stop: $local_fs rsyncd
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
# Description: sync the ramdisk
### END INIT INFO
// zlib license
// http://zlib.net/zlib_license.html
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
package jp.jyn.thisworld;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

Raspbianのインストールと初期設定 for Jessie

この記事は「Raspbianのインストールと初期設定」で紹介した手法を(何らかの理由があって)Raspbian Jessieに適用しなければならない時の差分です。
(違いのない部分は記載していませんので、記事そのものと一緒に読むことをお勧めします。)

自動更新

Stretchから/etc/apt/apt.conf.d/20auto-upgradesを作成する必要がなくなりました。
言い換えれば、Jessieではこれを作成する必要があるという訳です。

sudo tee /etc/apt/apt.conf.d/20auto-upgrades << 'EOL'

Raspbianのインストールと初期設定 for Stretch

この記事は「Raspbianのインストールと初期設定」で紹介した手法をRaspbian stretchに適用しなければならない時の差分です。
(違いのない部分は記載していませんので、記事そのものと一緒に読むことをお勧めします。)

ちなみに、Jessie用差分。

aptのミラーを変える

busterではなく、stretchと指定する必要がある。 ブログ内からコピペするときは注意。

@HimaJyun
HimaJyun / README.md
Last active January 24, 2021 22:58
DirectXでフレームレートを固定する奴

Directx-Fixed-Framerate

DirectXでフレームレート固定する奴
詳しくはブログ記事読んで、どうぞ。

@HimaJyun
HimaJyun / mozjpeg.sh
Last active February 15, 2021 03:16
mozjpeg cross compile for windows
#!/bin/bash -eux
: "install utils" && {
apt-get update
apt-get install -y nasm cmake curl git mingw-w64 libz-mingw-w64-dev
}
: "compile libpng" && {
tmp=$(curl -s "https://sourceforge.net/projects/libpng/rss" | \
grep "<link>.*.tar.gz" | grep -v "older-releases" | \
@HimaJyun
HimaJyun / Pi4B-OpenSSL.txt
Created December 4, 2019 09:37
Raspberry Pi 4 OpenSSL speed
OpenSSL 1.1.1d 10 Sep 2019
built on: Sat Oct 12 19:56:43 2019 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-f5SJyA/openssl-1.1.1d=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
md2 0.00 0.00 0.00 0.00 0.00 0.00
mdc2 0.00 0.00 0.00 0.00 0.00 0.00
md4 20140.84k 71924.97k 203053.82k 376768.85k 499122.18k 510050.30k
md5
@HimaJyun
HimaJyun / switchbot_plug_mini.py
Created March 8, 2023 21:14
Switchbot Plug Mini / Python / Bluetooth (BLE) / sample
import asyncio
import bleak
import bleak.backends.scanner
import argparse
debug = True
prev_seq = None
async def cb(_, adv: bleak.backends.scanner.AdvertisementData):