Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
# データ入力
my $PEOPLES = <STDIN>;
my $COMPANY_NUM = <STDIN>;
chomp ($PEOPLES,$COMPANY_NUM);
my @COMPANIES;
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use IPC::Open2;
use utf8;
use Encode;
my $sendmail = '/usr/sbin/sendmail';
my $nkf = '/usr/local/bin/nkf';
#!/bin/bash
set -e
function bitbucket {
git clone git@bitbucket.org:yaasita/$1.git
cd $1
git remote rm origin
git config --add receive.denyCurrentBranch ignore
cat <<EOF > .git/hooks/post-receive
#!/bin/bash
set -e
diff --git server/php/UploadHandler.php server/php/UploadHandler.php
index fb77be1..a990bdf 100755
--- server/php/UploadHandler.php
+++ server/php/UploadHandler.php
@@ -186,10 +186,20 @@ class UploadHandler
$https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
+
+ if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
#!/bin/bash
PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'`
export LANG=C
. /usr/lib/nagios/plugins/utils.sh
# Default values (days):
critical=7
warning=30
function ssl_check { #{{{
local OPT
OPTIND=1
local usage="usage: ssl_check [-s sni_servername] -c host[:port]"
if [ "$#" -lt 1 ]; then
echo $usage
return
fi
while getopts "hs:c:" OPT
do
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
#open (my $fh, "<", 'dev.txt') or die $!;
open (my $fh, "-|", 'curl "https://slack.com/api/channels.history?token=xxxxxx&channel=xxxxxx&pretty=1"') or die $!;
while (<$fh>){
my $line = $_;
while ($line =~ /((?:\\u[0-9a-f]{4})+)/g){
" ウインドウ単位で開いたファイルの履歴をたどる
function! FileJumpPush()
if !exists('w:histories')
let w:histories = []
endif
let buf = bufnr('%')
if count(w:histories, buf) == 0
call add(w:histories, buf)
endif
endfunction
# このファイルは MySQL 5.6を基準として作られてあります。
# http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html を参照しました。
[mysqld]
##--------------------------------------------------------------------
# mysqldの基本設定
##--------------------------------------------------------------------
# id は 1 から 2^32 -1 個の間で唯一の値になる必要がある
# server-idはReplicationを使うときには重複されてはいけない
# 単一システムの場合はDefaultの1で十分
#!/bin/bash
# rsyncでサーバまるごとコピーする
set -e
cat <<EOF > exc.txt
- /sys/*
- /proc/*
- /mnt/*
- /dev/*
- /tmp/*