Skip to content

Instantly share code, notes, and snippets.

Avatar

Yasunobu Okamura informationsea

View GitHub Profile
@informationsea
informationsea / font-download-install.sh
Created Jun 17, 2022
Install additional fonts to linux desktop
View font-download-install.sh
#!/bin/bash
set -eux -o pipefail
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
DOWNLOAD_DIR="${SCRIPT_DIR}/downloads"
FILES_DIR="${SCRIPT_DIR}/files"
function download() {
URL="$1"
@informationsea
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
informationsea / install-almalinux.sh
Last active Mar 5, 2022
Automated Alamlinux Install with KVM
View install-almalinux.sh
#!/bin/bash
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}]
@informationsea
informationsea / refFlat2Bed.py
Created Jun 28, 2015
Convert USCS refFlat.txt to BED format
View refFlat2Bed.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import csv
def _main():
parser = argparse.ArgumentParser(description="Convert RefFlat to BED format")
parser.add_argument('refFlat', type=argparse.FileType('r'))
parser.add_argument('outputBed', type=argparse.FileType('w'))
@informationsea
informationsea / refFlat2mergedBedFile.py
Created Aug 31, 2015
Convert refFlat to Bed File with merging isoforms
View refFlat2mergedBedFile.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import csv
import sqlite3
import sys
import commonlib
import collections
@informationsea
informationsea / crossthread.c
Created Dec 29, 2015
pthread compatible library for windows
View crossthread.c
/*
* light weight pthread compatible library for Windows
* (C) 2009 Okamura Yasunobu
*/
#include "crossthread.h"
#include <stdio.h>
#ifdef _WIN32
@informationsea
informationsea / xgmml_networkx.py
Created Dec 14, 2012
XGMML importer and exporter for networkx
View xgmml_networkx.py
__author__ = "Yasunobu OKAMURA"
__copyright__ = "Copyright (c) 2012 Y.Okamura"
__license__ = "GPL v3+"
import xml.parsers.expat
import networkx as nx
class XGMMLParserHelper(object):
"""
"""
@informationsea
informationsea / hashcat-benchmark.csv
Created Jan 12, 2017
Hashcat Benchmark on AWS p2.xlarge instance
View hashcat-benchmark.csv
Hash H/s
MD4 8549200000
MD5 4626000000
Half MD5 3157900000
SHA1 2005600000
SHA256 841000000
SHA384 202000000
SHA512 200500000
SHA-3(Keccak) 187100000
SipHash 8700100000
View Dockerfile
FROM centos:8 AS download-httpd
RUN dnf update -y
RUN dnf install -y bzip2
ARG HTTPD_VERSION=2.4.48
ARG APR_VERSION=1.7.0
ARG APR_UTIL_VERSION=1.6.1
RUN curl -OL https://ftp.tsukuba.wide.ad.jp/software/apache/httpd/httpd-${HTTPD_VERSION}.tar.bz2
RUN curl -OL https://ftp.kddi-research.jp/infosystems/apache/apr/apr-${APR_VERSION}.tar.bz2
RUN curl -OL https://ftp.kddi-research.jp/infosystems/apache/apr/apr-util-${APR_UTIL_VERSION}.tar.gz
RUN tar xjf httpd-${HTTPD_VERSION}.tar.bz2
@informationsea
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()
{