Skip to content

Instantly share code, notes, and snippets.

View mugifly's full-sized avatar
🏠
Working from home

Masanori Ohgita mugifly

🏠
Working from home
View GitHub Profile
@mugifly
mugifly / japan-prefectures-roman-hepburn.csv
Last active October 16, 2019 02:54
日本の都道府県名のヘボン式ローマ字リスト (CSV) / The list of Roman alphabet (Hepburn system) of the prefectures in Japan
北海道 ほっかいどう hokkaido
青森県 あおもり aomori
岩手県 いわて iwate
宮城県 みやぎ miyagi
秋田県 あきた akita
山形県 やまがた yamagata
福島県 ふくしま fukushima
茨城県 いばらき ibaraki
栃木県 とちぎ tochigi
群馬県 ぐんま gumma
@mugifly
mugifly / arch-cfs10-kernel-rebuild.pl
Last active March 18, 2016 16:21
Arch Linux - Linux kernel rebuild script for Let's note CF-S10 series. (Required: perl 5.x)
#!/usr/bin/env perl
# Arch Linux - Linux kernel rebuild script for Let's note CF-S10 series
# https://gist.github.com/mugifly/9582654/
# Required: perl 5.x
use strict;
use warnings;
use utf8;
use Cwd;
use File::Path;
/**
ArduinoProMini_FelicaPlug_Type3_RW.ino
Felica PlugのArduino向けライブラリに付属されているサンプルを基に改変
(ライブラリ: http://blog.felicalauncher.com/sdk_for_air/?page_id=2419)
**/
#define CONFIG_FELICA_PLUG_EEPROM
#include <EEPROM.h>
#include <FeliCaPlug.h>
#include <inttypes.h>
@mugifly
mugifly / gist-clone-ssh.pl
Last active December 26, 2015 11:59
Gist ssh-clone script (git clone via ssh)
#! /usr/bin/env perl
# Gist ssh-clone script
# Help: $ perl git-clone-ssh.pl --help
# (c) Masanori Ohgita (http://ohgita.info/) - 2013, MIT License.
use warnings;
use strict;
use utf8;
use File::Basename qw//;
@mugifly
mugifly / git-branch-clean.pl
Last active August 20, 2016 13:29
Git branch cleaner script - Delete a branches that not exist on remote repository. (perl 5.x)
#! /usr/bin/env perl
# Git branch cleaner ( Delete a branches that not exist on remote repository)
# If you have not ran the 'git fetch --plune' command, please try it before this script.
# Useful case (maybe): If can't delete a branches using 'git fetch --plune' command.
#
# Usage: $ perl git-branch-clean.pl --help
use warnings;
use strict;
use utf8;
@mugifly
mugifly / arduino_bluetooth-serial_led.ino
Last active December 20, 2015 22:59
スケッチ: "Arduino LeonardoによるBluetoothシリアル制御のLチカ" Arduinoのシリアル通信 および Bluetoothによるシリアル通信などから制御可能。 (0 = LED消灯, 1 = LED点灯, 2 = お遊び) http://masanoriprog.blogspot.jp/2013/08/arduino-bluetooth-serial-led.html
#include <SoftwareSerial.h>
#define LED_PORT 13
#define BT_RX 11
#define BT_TX 10
// TX(RBT-001) <-> 11(Arduino)
#define PWM_WIDTH 500
// roop = 2ms
@mugifly
mugifly / bayon_simple_webapi.pl
Last active December 15, 2015 07:19
Bayon Simple WebAPI (with Mojolicious::Lite)
#!/usr/bin/env perl
# Bayon Simple WebAPI (with Mojolicious::Lite)
# https://gist.github.com/mugifly/5222608
use Mojolicious::Lite;
use utf8;
use Mojo::JSON;
use Mojo::ByteStream;
use Mojo::Asset::File;
use Text::Bayon;
use Encode;
@mugifly
mugifly / blink.css
Last active April 25, 2018 06:30
CSS Blink for Webkit and others. (Chrome, Safari, Firefox (Gecko), IE, ...) CSSで擬似的なblinkを再現する簡単なTips。
@mugifly
mugifly / github_webhook_updater.cgi
Last active December 14, 2015 12:38
GitHub Webhook receiver & updater cgi (for Hosting-web-server)
#!/usr/bin/env perl
# GitHub Webhook receiver & updater cgi (for Hosting-web-server)
# https://gist.github.com/mugifly/5087897/
use strict;
use warnings;
use utf8;
use lib 'lib'; # for local lib directory
use CGI;
@mugifly
mugifly / backup-script-README.md
Last active December 22, 2021 22:02
backup-script.pl - Backup script for UNIX servers. (昔作った AmazonS3へのバックアップ用スクリプトです。一応動きますので公開しますw)

backup-script.pl - Backup script for UNIX servers.

Amazon S3へのバックアップ用スクリプトです。ディレクトリおよびMySQLデータベースのバックアップができます。

以前に作ったもので、やっつけ仕事で汚すぎるコードですが、一応動きますので公開しますw サーバのcrontabにでも登録してご自由にご利用ください。

ファイルシステムはSquashFSを用いてアーカイブされます (MySQLデータベースは、tar.gz)。

必要なパッケージ

  • CentOS/Fedora: