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/zsh -eu | |
function writable { | |
TARGET=$* | |
echo -e "\e[37m'$TARGET'\e[m のパーミッションを変更します。" | |
/usr/bin/sudo /usr/bin/chmod -R a+w "$TARGET" | |
echo -e "\e[37m'$TARGET'\e[m に \e[32m'httpd_sys_rw_content_t'\e[m を付与します。" | |
/usr/bin/sudo /usr/sbin/semanage fcontext -a -t httpd_sys_rw_content_t "$TARGET(/.*)?" |
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/sh | |
./configure --enable-multibyte --with-features=huge --disable-selinux \ | |
--prefix=/usr/local \ | |
--enable-luainterp=yes --with-luajit \ | |
--enable-perlinterp=dynamic \ | |
--enable-rubyinterp=dynamic \ | |
--enable-pythoninterp=dynamic --enable-python3interp=dynamic \ | |
--enable-fail-if-missing |
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
// ==UserScript== | |
// @name Translate DateTime in GitLab | |
// @namespace http://www.yuuan.net/item/1054 | |
// @description 英語で書かれた日付を数字に変える | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js | |
// @include http://gitlab.com/* | |
// @version 0.1 | |
// @grant none | |
// ==/UserScript== | |
(function($) { |
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 | |
/** | |
* `@param` で渡された変数が宣言されていないときに、 | |
* `debug` モードならエラーを出し、そうでなければ宣言して null を代入する | |
* | |
*/ | |
Blade::extend(function($view, $compiler) | |
{ | |
$pattern = $compiler->createMatcher('param'); |
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
@-moz-document url-prefix(view-source) { | |
body { | |
margin: 0; | |
} | |
#viewsource { | |
font-family: "Ricty"; | |
font-size: 10pt; | |
line-height: 135%; | |
} | |
#line1:before { |
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 | |
/** | |
* Application model for Cake. | |
* | |
* This file is application-wide model file. You can put all | |
* application-wide model-related methods here. | |
* | |
* @link http://cakephp.org CakePHP(tm) Project | |
* @package app.Model | |
* @since CakePHP(tm) v 0.2.9 |
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
#This configuration has been tested on GitLab 6.0.0 and GitLab 6.0.1 | |
#Note this config assumes unicorn is listening on default port 8080. | |
#Module dependencies | |
# mod_rewrite | |
# mod_ssl | |
# mod_proxy | |
# mod_proxy_http | |
# mod_headers | |
# This section is only needed if you want to redirect http traffic to https. |
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
# | |
# This is an example for a configuration file that can | |
# be passed to colinux-daemon in this manner: | |
# | |
# colinux-daemon @example.conf | |
# | |
# Note that you can still prepend or append configuration and | |
# boot parameters before and after '@', or you can use more | |
# that one '@ to load several settings one after another. | |
# |
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 | |
// ... | |
/** | |
* Setting up the view component | |
*/ | |
$di->set('view', function () use ($config) { | |
$view = new View(); |
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 | |
class Log { | |
const LOG_FILE = 'log/console.log'; | |
public static function warn($message = '', $toError = true) { | |
if ($toError) { | |
return user_error("$message", E_USER_WARNING); | |
} | |
else { | |
// 呼び出し元のファイル名と行番号とか出したい |