Skip to content

Instantly share code, notes, and snippets.


Yasunobu Okamura informationsea

View GitHub Profile
informationsea /
Created Jun 17, 2022
Install additional fonts to linux desktop
set -eux -o pipefail
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
function download() {
informationsea / fill-data.ps1
Created Apr 21, 2022
Create large file with PowerShell
View fill-data.ps1
$FillData1 = ""
for ($i = 0; $i -lt 1000; $i++) {
$FillData1 += "0"
$FillData2 = ""
for ($i = 0; $i -lt 1000; $i++) {
$FillData2 += $FillData1
informationsea /
Last active Mar 5, 2022
Automated Alamlinux Install with KVM
function install-almalinux-usage() {
cat <<EOF 1>&2
$0 [options] name
-l INSTALL_ISO AlmaLinux ISO [Example: ${VM_INSTALL_ISO}]
-b BOOTPROTO IPv4 boot protocol (dhcp/static) [Example: ${VM_IP_BOOTPROTO}]
-i IP_ADDR IPv4 address [Example: ${VM_IP_ADDR}]
-m IP_NETMASK IPv4 netmask [Example: ${VM_IP_NETMASK}]
View Dockerfile
FROM centos:8 AS download-httpd
RUN dnf update -y
RUN dnf install -y bzip2
RUN curl -OL${HTTPD_VERSION}.tar.bz2
RUN curl -OL${APR_VERSION}.tar.bz2
RUN curl -OL${APR_UTIL_VERSION}.tar.gz
RUN tar xjf httpd-${HTTPD_VERSION}.tar.bz2
informationsea / ffmpeg-converter.c
Last active May 1, 2021
ffmpeg convert helper for windows
View ffmpeg-converter.c
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#include <stdlib.h>
#include <string.h>
void wait_key();
int main()
informationsea /
Created Dec 31, 2020
M5StickC Plus + GridEye
#include <M5StickCPlus.h>
#include <Wire.h>
#include <SparkFun_GridEYE_Arduino_Library.h>
GridEYE grideye;
void setup() {
// put your setup code here, to run once:
informationsea /
Last active Jul 23, 2020
Convert PEM RSA public key to JWK format (imcomplete)
use clap::{crate_authors, crate_version, App, Arg};
use simple_asn1::ASN1Block;
use std::fs;
use std::io::prelude::*;
use std::str;
fn main() {
let matches = App::new("view-ans1")
informationsea / Dockerfile
Created Jul 20, 2020
Build OpenJDK 11 for Cent OS 7
View Dockerfile
FROM centos:7 AS jdk-download
RUN yum update -y
RUN curl -o jdk11u.tar.gz -L
FROM centos:7
RUN yum update -y
RUN yum install -y java-11-openjdk-devel autoconf automake bison flex gcc gcc-c++ gcc-gfortran kernel-devel make m4 patch tar bzip2 gzip xz file gmp-devel mpfr-devel wget rsync unzip zip libXtst-devel libXt-devel libXrender-devel cups-devel alsa-lib-devel freetype-devel which ccache mercurial bison flex gperf ksh pkgconfig libpng-devel libjpeg-devel libxml2-devel libxslt-devel systemd-devel glib2-devel gtk2-devel libXtst-devel pango-devel freetype-devel libXxf86vm-devel mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel
COPY --from=jdk-download /jdk11u.tar.gz .
RUN tar xzf /jdk11u.tar.gz
WORKDIR /jdk11u-0b0d55cb09b2
informationsea / mac-inputs.m
Created May 20, 2020
macOS input method change tool
View mac-inputs.m
#include <stdio.h>
#include <string.h>
#include <Carbon/Carbon.h>
int main(int nargs, char** argv) {
if (nargs != 2) {
fprintf(stderr, "%s (on|off)\n", argv[0]);
return 1;
informationsea / Dockerfile
Created Mar 24, 2020
Build Wine for CentOS 7
View Dockerfile
FROM centos:7 AS download-wine
WORKDIR /download
RUN curl -OL
RUN tar xJf wine-5.4.tar.xz
FROM centos:7
RUN yum update -y
RUN yum install samba-winbind-clients -y
RUN yum -y groupinstall base "Development tools" --setopt=group_package_types=mandatory,default,optional
RUN yum install -y libjpeg-turbo-devel libtiff-devel freetype-devel glibc-devel.{i686,x86_64} libgcc.{i686,x86_64} \