This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copyFlame を呼ぶと video#player のフレームにそれに対応する時刻の字幕が埋め込まれた canvas cEle ができるデモ | |
var _copyFrame = function (jimakuText) { | |
var cEle = document.createElement('canvas'); | |
var vEle = document.getElementById('player'); // video element | |
cEle.width = vEle.videoWidth; | |
cEle.height = vEle.videoHeight; | |
var bottom = cEle.height - 30; | |
var width = cEle.width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
# ルーターメトリック収集スクリプト | |
## 概要 | |
定期的にルーターのリソースを監視して、プロキシ経由で Mackerel に下記メトリック情報を送信します | |
* CPU 使用率(整数) | |
* メモリ使用率(整数) | |
* 筐体内温度(整数) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fontforge -lang=py -script | |
# -*- coding: utf-8 -*- | |
import fontforge | |
from datetime import date | |
# Open Sans のあるディレクトリのパス | |
opensans_path = "./Open_Sans" | |
# M+ のあるディレクトリのパス |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fontforge -lang=py -script | |
# -*- coding: utf-8 -*- | |
import fontforge | |
from datetime import date | |
# Open Sans のあるディレクトリのパス | |
opensans_path = "./Open_Sans" | |
# M+ のあるディレクトリのパス |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amazonの注文履歴をCSV形式にして出力するスクリプト | |
// | |
// 以下のスクリプトを参考に作成されました。 | |
// http://moroya.hatenablog.jp/entry/2013/06/03/225935 | |
// | |
// 使い方は以下のURLに書いてあります。 | |
// https://junkato.jp/ja/blog/2014/11/13/amazon-payment-history-as-csv/ | |
// | |
// CSVに成型しているのは14行目から定義されているformatEntryという関数なので、これを書き換えれば自由な書式で出力できます。 | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
Plugin.create :post_as_mikutter_command do | |
command(:post_as_mikutter_command, | |
name: 'mikutterコマンドとして実行', | |
condition: lambda{ |opt| Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text.size > 0 }, | |
visible: true, | |
role: :postbox) do |opt| | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |