Skip to content

Instantly share code, notes, and snippets.

@ynott
ynott / php-fpm-cli
Created August 16, 2014 07:17 — forked from muhqu/php-fpm-cli
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@ynott
ynott / php-fpm-cli.sh
Last active August 29, 2015 14:15
php-fpm-cli
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#!/bin/bash
bash ./php-fpm-cli -r 'opcache_reset();' -connect /var/run/php-fpm/php-fpm.sock
#!/bin/bash
ESXI_VER=5.1
DISTRI=rhel6
ARCH=x86_64
wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
@ynott
ynott / get-coursera-materials.sh
Created March 22, 2015 14:43
get coursera materials
#!/bin/bash
MATERIAL_NO='ml-005'
START_NO=1
END_NO=114
for NUM in $(seq ${START_NO} ${END_NO})
do
curl -L -O --remote-header-name "https://class.coursera.org/${MATERIAL_NO}/lecture/download.mp4?lecture_id=${NUM}"
curl -L -O --remote-header-name "https://class.coursera.org/${MATERIAL_NO}/lecture/subtitles?q=${NUM}_ja&format=srt"
<?php
/*
Copyright 2013 Stuart Carnie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
@ynott
ynott / shell
Last active May 20, 2016 04:17
コマンドラインからownCloud上のフォルダーを共有設定する方法について ref: http://qiita.com/ynott/items/afca4b4cf9905710f5e2
curl "https://<owncloud_host>/ocs/v1.php/apps/files_sharing/api/v1/shares" -l -k -u <ID>:<PW> -X POST --data-urlencode "path=<DocumentPath>" --data-urlencode "shareWith=<ShareWith>" --data "shareType=<ShareType>&permissions=<Permission>"
@ynott
ynott / maillog-hashnize.pl
Created February 8, 2016 03:02 — forked from xtetsuji/maillog-hashnize.pl
enhancement of "pflog" for parsing maillog of postfix 2.3 or higher version.
#!/usr/bin/perl
# "pflog" enhancement for parsing maillog of postfix 2.3 or higher version.
# "pflog" see: http://www.tmtm.org/ruby/pflog/pflog-0.3
use strict;
use warnings;
use Time::Local;
use Getopt::Long;
#use Data::Dumper;
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/var/run/php-fpm/php-fpm.sock;
}
server {
listen 80;
server_name cloud.example.com;
# enforce https
return 301 https://$server_name$request_uri;
@ynott
ynott / swaplist.pl
Created June 18, 2016 02:51
Swap Sizeを確認する方法
#!/bin/env perl
# pachi
#
# This script find out process currently swapped by /proc/$PID/status
use strict;
use warnings;
# When you want to debug, you should exec "export SCRIPT_DEBUG=1".
my $debug = $ENV{SCRIPT_DEBUG} ? 1 : 0;