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/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* original -> https://gist.github.com/mardix/3623562 | |
*/ | |
/** | |
* collect all files which have been added, copied or | |
* modified and store them in an array called output |
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 | |
#ブランチ名を取得 | |
Branch="$(git rev-parse --abbrev-ref HEAD)" | |
#コミットメッセージの最初にブランチ名を追加 | |
mv $1 $1.tmpbycommit-msg | |
echo -n "[$Branch] " > $1 | |
cat $1.tmpbycommit-msg >> $1 |
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/bash | |
echo "---------------------start post-receive : `date`" >> ~/kuji.log | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | sed 's/refs\/heads\///'` | |
echo $ref >> ~/kuji.log | |
done | |
echo $branch >> ~/kuji.log |
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
'use strict'; | |
/** | |
* | |
* Make sure you must install modules below before use. | |
* | |
* > $ npm i grunt-contrib-watch --save-dev | |
* > $ npm i grunt-exec --save-dev | |
* | |
* |
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
diff --git a/Smarty.tmPreferences b/Smarty.tmPreferences | |
index bf6a0ea..f4117e0 100644 | |
--- a/Smarty.tmPreferences | |
+++ b/Smarty.tmPreferences | |
@@ -14,13 +14,13 @@ | |
<key>name</key> | |
<string>SMARTY_LDELIM</string> | |
<key>value</key> | |
- <string><![CDATA[{]]></string> | |
+ <string><![CDATA[<{ ]]></string> |
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
<ruleset name="Custom Standard"> | |
<description>My custom coding standard</description> | |
<rule ref="PSR2"> | |
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"/> | |
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/> | |
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/> | |
<exclude name="Generic.Files.LineLength.TooLong"/> | |
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/> |
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 | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
$path = "/var/www/html/abc"; | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd '.$path.' && git reset --hard HEAD && git pull 2>&1' ); | |
} |
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 | |
// Use in the "Post-Receive URLs" section of your Bitbucket repo. | |
if ( $_POST['payload'] ) { | |
$data = json_decode($_POST['payload']); | |
$commits = $data->{"commits"}; | |
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
$ root@docker02:~# docker exec -it gitlab-runner gitlab-runner exec -h | |
NAME: | |
gitlab-runner exec - execute a build locally | |
USAGE: | |
gitlab-runner exec command [command options] [arguments...] | |
COMMANDS: | |
docker use docker executor | |
docker-ssh use docker-ssh executor |
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/bash | |
# get latest stable version | |
VER=$(curl -s http://heanet.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/ | grep -P "alt=\"\[DIR\]\" /> <a href=" | grep -v alpha | grep -v beta | awk -F'[\"]' '{print $6}' | sed -e "s/\///" | tail -1 ) | |
eyel "---------------------------------------------------" | |
eblu Install zabbix-agent version | |
egre $VER | |
eyel "---------------------------------------------------" |
OlderNewer