Skip to content

Instantly share code, notes, and snippets.

View Shinichi-Ohki's full-sized avatar

Shinichi Ohki Shinichi-Ohki

  • Switch Science / 144Lab
  • Japan
View GitHub Profile
@Shinichi-Ohki
Shinichi-Ohki / giteki.svg
Last active May 2, 2022 01:30
技適マークをSVGで書いた
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Shinichi-Ohki
Shinichi-Ohki / vibe_test.ino
Created March 11, 2021 04:11
M5Stack Core2 vibration test sketch.
#include <M5Core2.h>
void vibration(int t) {
M5.Axp.SetLDOEnable(3, true);
delay(t);
M5.Axp.SetLDOEnable(3, false);
}
void setup() {
M5.begin(true, true, true, true);
@Shinichi-Ohki
Shinichi-Ohki / m5paper_rtc_set_ntp.ino
Last active June 19, 2021 15:07
M5Paper RTC set from NTP
#include <M5EPD.h>
#include <WiFi.h>
rtc_time_t RTCtime;
rtc_date_t RTCDate;
char timeStrbuff[64];
static const int JST = 3600 * 9;
static const char *wd[7] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"};
@Shinichi-Ohki
Shinichi-Ohki / readme.md
Last active March 18, 2023 04:39
テカナリエレポートをまとめるスクリプト(要pdftk)

テカナリエレポートをまとめるスクリプトです

  • tlsr.rb 番号 でその号のテカナリエレポートをくっつけます。 (例: ruby tlsr.rb 450)
  • 番号は複数指定できます。 (例: ruby tlsr.rb 450 451)
  • -d でディレクトリを指定できます。省略するとカレントディレクトリになります。 (例: ruby tlsr.rb -d treport 450 451)
  • -o で出力ディレクトリを指定できます。省略すると-dで指定したディレクトリになります。 (例: ruby tlsr.rb -d treport -o output 450 451)
  • 2ページ目の画像をJPEGで出力します。出力先は上記出力ディレクトリです。-pでページ数を指定できます
  • -npで画像の出力を抑止します。-pオプションより強いです。
  • pdftkが必要です。 https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
  • macOS版は https://qiita.com/keitasumiya/items/83756caf2865291707fb を参照してください
@Shinichi-Ohki
Shinichi-Ohki / tsp_notice.rb
Created August 2, 2020 05:29
TSP(Task Spooler)のキューに積まれたタスクが全部終わったらPush Bulletで通知を飛ばすRuby Script
#!/usr/bin/env ruby
require 'pushbullet_ruby'
client = PushbulletRuby::Client.new("***pushbullet Access Token***")
tsstr = `tsp`
count=[0,0,0] # running | queued | finished
@Shinichi-Ohki
Shinichi-Ohki / qdate.rb
Last active July 26, 2020 14:08
QooCam output JPEG file Date/Time adjuster
#!/usr/bin/env ruby
require 'optparse'
require 'mini_exiftool'
option_hash = {}
OptionParser.new{|opt|
opt.on('-i','--input JpegFilename' 'string JpegFilename') {|v| option_hash[:orgpathname] = v}
opt.parse!(ARGV)
}
@Shinichi-Ohki
Shinichi-Ohki / headphone_hook_rev2.scad
Created May 24, 2020 04:36
ヘッドフォンフック Openscad
w = 25;
$fn=32;
module kadomaru(w,dir) {
rotate(dir*90) {
intersection() {
translate([2,0,0]) {
cylinder(h=w,r=2);
}
cube([2,2,w]);
@Shinichi-Ohki
Shinichi-Ohki / CSIA会員リスト.csv
Created May 21, 2020 12:54
CSIA 中国半导体行业协会 の会員リスト(社名とURL)をまとめました http://www.csia.net.cn/Index.asp
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 1.
- CSIA现有会员名录:集成电路类
中国电子科技集团公司第四十七研究所,www.dz47.com
北京首钢微电子有限公司,http://www.bsmc.com.cn/
西安微电子技术研究所(中国航天科技集团公司第九研究院第七七一研究所),www.
哈尔滨海格科技发展有限责任公司,www.hegtech.com
北京伊泰克电子有限公司,www.estek.com.cn
华润微电子有限公司,www.crmicro.com
北京大学信息科学技术学院微电子学研究院,www.ime.pku.edu.cn
英飞凌科技(中国)有限公司,www.infineon.com/cn
上海华虹宏力半导体制造有限公司,www.hhgrace.com
@Shinichi-Ohki
Shinichi-Ohki / base_convert_for_alfred4.rb
Last active February 26, 2020 14:17
base converter workflow for Alfred 4
def output_16(q16)
output = <<"EOS"
{ "title": "#{q16}",
"arg": "#{q16}",
},
{ "title": "0x#{q16}",
"arg": "0x#{q16}",
}
EOS
output
@Shinichi-Ohki
Shinichi-Ohki / suiryushi.ahk
Last active August 11, 2019 09:14
水龍士I 復刻版をノートPCでやるためのキー入れ替え(AutoHotKey)
#InstallKeybdHook
#UseHook
u::4
i::5
o::6
j::1
k::2
l::3
p::*
+u::u