Skip to content

Instantly share code, notes, and snippets.

View Drunkar's full-sized avatar

Akio Ohta Drunkar

View GitHub Profile
@Drunkar
Drunkar / images_to_mp4.bat
Last active May 9, 2018 14:53
vvvv video write example
ffmpeg -y -r 30 -i "./render_%%06d.png" -start_number 10011 -vcodec libx264 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -r 30 ./rendered.mp4
# coding: utf-8
import logging
import traceback
import argparse
import time
from logging.handlers import RotatingFileHandler
from contextlib import contextmanager
logger = logging.getLogger(__name__)
@Drunkar
Drunkar / bom2csv.py
Last active June 30, 2017 07:47 — forked from andete/gist:71b531b081fbc3ac0671
KiCad csv BOM generter plugin
#!/usr/bin/env python
# (c) 2015 Productize <[email protected]>
# edited by Drunkar <[email protected]>
import os
import sys
import copy
import collections
import codecs
@Drunkar
Drunkar / lato.less
Created May 30, 2017 09:37
slack for windowsで日本語フォントをnoto sans cjk jpに変更する。path: C:\Users\<ユーザ名>\AppData\Local\slack\app-<バージョン>\resources\app.asar.unpacked\src\static\lato.less
/*
This is a smaller variant of the new Lato2, serving compressed woff2 files.
Currently: TS-Only
Clients needs to have Lato2 pref turned ON.
The payload is 50% smaller. However, woff2 is not yet well supported,
so we're still providing the woff as fallback.
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#define NUMFLAKES 10
#define XPOS 0
/*
64 x 48 OLED version of:
https://www.mgo-tec.com/blog-entry-31.html
*/
#include <Wire.h>
#define OLED_ADDR (0x3C) //OLED address 製品に記載の数値は7bitなので、8bitに変換して1bit右へずらした値(78>>3c)
byte DotB1[8]={
B00000000,
// https://github.com/netlabtoolkit/VarSpeedServo
#include <VarSpeedServo.h>
VarSpeedServo myservo1;
VarSpeedServo myservo2;
VarSpeedServo myservo3;
void setup() {
myservo1.attach(9);
myservo2.attach(10);
.markdown-preview {
@c_border: #666; // border-color
max-width: 900px;
margin: 0 auto;
padding: 25px;
color: black;
hr {
margin: 50px 0;
background-color: transparent;
import argparse
parser = argparse.ArgumentParser(description="argparse template.")
parser.add_argument("-i", "--input", type=str, required=True, help="Required: Input file.")
parser.add_argument("-o", "--output", type=str, required=True, help="Required: Output file.")
parser.add_argument("-s", "--simulate", action="store_true", help="Simulate flag.")
args = parser.parse_args()