Skip to content

Instantly share code, notes, and snippets.

View windyakin's full-sized avatar

Takuto Kanzaki windyakin

View GitHub Profile
@windyakin
windyakin / README.md
Last active November 20, 2020 02:52
Twitterの広告関心をすべてチェック外すやつ
@windyakin
windyakin / README.md
Created July 26, 2020 09:13
ffmpeg broadcast with clock command

ffmpeg で時間表示しながらエンコードするやつ

自分用のメモなので大した情報はないです

環境

  • Raspberry Pi 3 B+ Rev 1.2
    • 1280x720 の動画のエンコードをギリギリリアルタイムでできる程度の能力しかない
    • 電源も大した電圧用意できなかったので変えたら変わるかも
  • 今回実験で使ったのが Docker なので直に動かしたらもうちょっと改善する?
@windyakin
windyakin / expand.js
Last active January 24, 2020 05:12
Get elements array sorted by z-index
// List
Array.prototype.map.call(
document.getElementsByTagName('*'),
(element) => {
return {
element: element,
zIndex: parseInt(getComputedStyle(element)["z-index"])
}
}
).filter(
@windyakin
windyakin / Dockerfile
Last active June 18, 2017 07:47
Ubuntu 16.04 Japanized Container
FROM ubuntu:xenial
ARG USERNAME=windyakin
RUN sed -i.bak -e "s%http://archive.ubuntu.com/ubuntu/%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g" /etc/apt/sources.list
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y sudo git zsh software-properties-common build-essential curl file python-setuptools ruby \
&& rm -rf /var/lib/apt/lists/*
@windyakin
windyakin / GitHub.css
Created July 20, 2016 05:28
GitHub Japanese Style
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(https://github.com/) {
body, .markdown-body {
font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
}
}
@windyakin
windyakin / Honoka import other repository.md
Last active August 29, 2015 14:25
Honoka import other repository

Honokaを自分のリポジトリに呼び込む方法

いろいろ試してみた結果のまとめ。

HonokaとBootstrapをGit Submoduleで読み込む

とりあえずHonokaとBootstrapをGit Submoduleをつかってリポジトリに読み込みます(例ではsrc/フォルダに読み込む)。

% git submodule add https://github.com/twbs/bootstrap-sass.git src/bootstrap
@windyakin
windyakin / attack.txt
Created December 11, 2014 04:11
SSHハニーポット被攻撃リスト
1479 root/root
547 root/admin
316 admin/admin
218 ftpuser/asteriskftp
210 D-Link/D-Link
155 root/123456
68 root/
60 admin/password
58 admin/root
58 admin/1234
@windyakin
windyakin / gist:6d4a75205cf1ea4eaa8d
Created October 16, 2014 08:15
高専 プルダウン
<select>
<optgroup label="北海道">
<option value="函館工業高等専門学校">函館工業高等専門学校</option>
<option value="苫小牧工業高等専門学校">苫小牧工業高等専門学校</option>
<option value="釧路工業高等専門学校">釧路工業高等専門学校</option>
<option value="旭川工業高等専門学校">旭川工業高等専門学校</option>
</optgroup>
<optgroup label="東北">
<option value="八戸工業高等専門学校">八戸工業高等専門学校</option>
<option value="一関工業高等専門学校">一関工業高等専門学校</option>
alias curry="ruby -e 'C=\`stty size\`.scan(/\d+/)[1].to_i;S=\"\xf0\x9f\x8d\x9b\";a={};puts \"\033[2J\";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print \"\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H\"};\$stdout.flush;sleep 0.01}'"
@windyakin
windyakin / webhook.php
Created July 24, 2014 04:59
webhook.php
<?php
$LOG_FILE = dirname(__FILE__).'/hook.log';
$SECRET_KEY = '< secret key >';
$GIT_PATH = "< git repository path >";
$payload = file_get_contents("php://input");
if ( $_SERVER['HTTP_X_HUB_SIGNATURE'] === "sha1=".hash_hmac('sha1', $payload, $SECRET_KEY) ) {
$payload = json_decode($payload, true);
if ($payload['ref'] === 'refs/heads/master') {