Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Akashi_SN AkashiSN

🏠
Working from home
View GitHub Profile
@AkashiSN
AkashiSN / softether-install-vyos1.2.md
Created Apr 27, 2019
vyos1.2にSoftEther VPNをインストールする
View softether-install-vyos1.2.md

vyos1.2にSoftEther VPNをインストールする

1.2.0-rolling+201904260337ではgccなどが依存関係によりインストールできないので他のマシンでビルドを行う

Linux router 4.19.36-amd64-vyos #1 SMP Sun Apr 21 10:39:20 CEST 2019 x86_64 GNU/Linux

kernelバージョンは4.19.36のようなので、ubuntu18.10kernelバージョンを4.19.36にあげてビルドを行う

View resize_cover_art.py
#!/usr/bin/env python3
from mutagen.mp4 import MP4, MP4Cover
from io import BytesIO
from PIL import Image
import pathlib
import math
files = list(pathlib.Path(".").glob("**/*.m4a"))
for f in files:
print(f)
@AkashiSN
AkashiSN / Dockerfile
Last active Apr 25, 2021
FFmpeg with Intel QSV (Intel Quick Sync Video) in Docker
View Dockerfile
FROM debian:buster AS ffmpeg-build
ENV DEBIAN_FRONTEND=noninteractive
# Install build tools
RUN apt-get update && \
apt-get install -y make build-essential yasm nasm cmake pkg-config
ENV FFMPEG_CONFIGURE_OPTIONS="" \
FFMPEG_EXTRA_LIBS=""
@AkashiSN
AkashiSN / server.go
Created Jan 30, 2021
Simple SSL Static File Server in go
View server.go
package main
import (
"crypto/tls"
"flag"
"log"
"net/http"
"time"
)
@AkashiSN
AkashiSN / dev_tools.sh
Last active Jan 11, 2021
Development tool installation script for ubuntu 18.04 LTS
View dev_tools.sh
#!/bin/bash
#
# JetBrains ToolBox
#
# Download program.
wget https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.11.4269.tar.gz -P /tmp
# Expand archives.
View gpg-agent-relay
#!/usr/bin/env bash
# https://gist.github.com/andsens/2ebd7b46c9712ac205267136dc677ac1
GNUPGHOME="$HOME/.gnupg"
PIDFILE="$GNUPGHOME/gpg-agent-relay.pid"
die() {
# shellcheck disable=SC2059
printf "$1\n" >&2
exit 1
@AkashiSN
AkashiSN / Dockerfile
Last active Apr 8, 2020
7 Days to Die Dedicated Server in Docker
View Dockerfile
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NOWARNINGS=yes
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository multiverse \
&& dpkg --add-architecture i386 \
&& apt-get update \
@AkashiSN
AkashiSN / Dockerfile
Last active Dec 25, 2019
Jupyterlab docker
View Dockerfile
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 as cuda
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_DRIVER_CAPABILITIES utility,compute
ENV NVIDIA_VISIBLE_DEVICES all
RUN sed -i'~' -E "s@http://(..\.)?(archive|security)\.ubuntu\.com/ubuntu@http://jp.archive.ubuntu.com/ubuntu@g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
build-essential \
@AkashiSN
AkashiSN / generate_validation.py
Created Dec 16, 2019
generate yolo training and validation(test)
View generate_validation.py
#!/usr/bin/env python3
import glob, os, sys
# Current directory
data_dir = sys.argv[1]
print(data_dir)
# Percentage of images to be used for the test set
percentage_test = 10
@AkashiSN
AkashiSN / detectnet2yolo.py
Created Dec 16, 2019
convert detectnet labeling format to yolov3 labeling format tool
View detectnet2yolo.py
#!/usr/bin/env python3
import os
import sys
import glob
from PIL import Image
classes = {
'Car' : 0,
'Van' : 1,
'Truck' :2,