Amazon S3へのバックアップ用スクリプトです。ディレクトリおよびMySQLデータベースのバックアップができます。
以前に作ったもので、やっつけ仕事で汚すぎるコードですが、一応動きますので公開しますw サーバのcrontabにでも登録してご自由にご利用ください。
ファイルシステムはSquashFSを用いてアーカイブされます (MySQLデータベースは、tar.gz)。
- CentOS/Fedora:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>BGColors Sample</title> | |
| <script type="text/javascript" src="bg-colors.js"></script> | |
| <script type="text/javascript"> | |
| function sampleDraw(){ | |
| new BGColors(['red','green','blue','yellow'], document.getElementById('sample')); | |
| } | |
| </script> |
| #!/usr/bin/env perl | |
| # Perl - Gmail IMAP Using OAuth 2.0 (XOAUTH2) | |
| # I referred to: http://eatenbyagrue.org/tags/oauth/index.html Thank you. | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Mail::IMAPClient; |
| #!/usr/bin/env perl | |
| use Mojolicious::Lite; | |
| push @{app->static->paths}, 'site/'; # File path | |
| app->start('daemon'); | |
| # Execute this script on terminal: perl daemon.pl | |
| # Then, let's access to http://localhost:3000/*** |
| 'use strict'; | |
| angular.module('foo', []) | |
| .filter('substring', function() { | |
| return function(str, start, end) { | |
| return str.substring(start, end); | |
| }; | |
| }) |
| #!/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; |
| /* Blink for Webkit and others | |
| (Chrome, Safari, Firefox, IE, ...) | |
| */ | |
| @-webkit-keyframes blinker { | |
| from {opacity: 1.0;} | |
| to {opacity: 0.0;} | |
| } | |
| .blink{ | |
| text-decoration: blink; |
| #!/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; |
| #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 |
| #! /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; |