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/env bash | |
## | |
# CVE-2015-0235 restart all services that using `glibc` | |
# | |
# original code: | |
# http://ma.ttias.be/critical-glibc-update-cve-2015-0235-gethostbyname-calls/#comment-10890 | |
## | |
servicelist=""; | |
for problemservice in `/usr/sbin/lsof 2> /dev/null | grep libc | awk '{print $1}' | sort -u`; do |
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
<?php | |
/** | |
* This file read before Configure::load('app') | |
*/ | |
use Dotenv; | |
/** | |
* required setting | |
*/ |
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
description "gitlab service runner" | |
start on filesystem and started docker.io | |
stop on runlevel [!2345] | |
kill signal CONT | |
normal exit 0 CONT | |
respawn | |
setuid manager |
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
<?php | |
// Route::controller の戻り値は void なので Route::pattern でパラメータをチェック | |
Route::pattern('ext', 'xml|json'); | |
// API 定義 | |
Route::controller('api/{resource}.{ext?}', 'ApiController'); | |
class ApiController extends \BaseController { | |
public function getIndex($resource, $ext = null) | |
{ |
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 bash | |
## | |
# | |
# Custom PHPUnit script for CakePHP on NetBaeans 8.0 | |
# | |
# @author Takashi Nojima [http://php-tips.com] | |
# @copyright 2014 Takashi Nojima | |
## | |
PROJECT_ROOT=$(cd "$(dirname "$(dirname "$0")")" && pwd) |
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
---- | |
-- User configuration file for lsyncd. | |
-- | |
settings{ | |
logfile="/var/log/lsyncd/lsyncd.log", | |
statusFile="/var/log/lsyncd/lsyncd.status", | |
maxDelays=15 | |
} | |
--- |
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 bash | |
export PATH="$HOME/.phpenv/bin:/opt/local/bin:$PATH" | |
eval "$(phpenv init -)" | |
args="" | |
while [ "$1" != "" ] ; do | |
arg=$1 | |
if [[ $arg =~ NetBeansSuite.php && -f $(pwd)/nbproject/NetBeansSuite.php ]] ; then | |
# Change custom NetBeansSuite path | |
arg=$(pwd)/nbproject/NetBeansSuite.php |
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
<?php | |
/* | |
* Warning! Read and use at your own risk! | |
* | |
* This tiny proxy script is completely transparent and it passes | |
* all requests and headers without any checking of any kind. | |
* The same happens with JSON data. They are simply forwarded. | |
* | |
* This is just an easy and convenient solution for the AJAX |
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 bash | |
#Common Name (eg, your name or your server's hostname) | |
CN="ssl.example.com" | |
# Country Name (2 letter code) | |
C="JP" | |
# State or Province Name (full name) | |
ST="Fukuoka" | |
# Locality Name (eg, city) | |
L="Fukuoka" |
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
<?php | |
App::uses('DispatcherFilter', 'Routing'); | |
class CorsFilter extends DispatcherFilter { | |
public function beforeDispatch(CakeEvent $event) { | |
if ($event->data['request']->is('OPTIONS')) { | |
$event->stopPropagation(); | |
$event->data['response']->header(array( |