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
-- Tit Petric, Monotek d.o.o., Thu 27 Oct 2016 10:43:38 AM CEST | |
-- | |
-- Delete nginx cached assets with a PURGE request against an endpoint | |
-- | |
local md5 = require 'md5' | |
function file_exists(name) | |
local f = io.open(name, "r") | |
if f~=nil then io.close(f) return true else return false end |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func StructToMap(s interface{}) map[string]interface{} { | |
m := make(map[string]interface{}) | |
elem := reflect.ValueOf(s).Elem() |
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
[unix_http_server] | |
file=/tmp/supervisor.sock ; socket文件的路径,supervisorctl用XML_RPC和supervisord通信就是通过它进行 | |
的。如果不设置的话,supervisorctl也就不能用了 | |
不设置的话,默认为none。 非必须设置 | |
;chmod=0700 ; 这个简单,就是修改上面的那个socket文件的权限为0700 | |
不设置的话,默认为0700。 非必须设置 | |
;chown=nobody:nogroup ; 这个一样,修改上面的那个socket文件的属组为user.group | |
不设置的话,默认为启动supervisord进程的用户及属组。非必须设置 | |
;username=user ; 使用supervisorctl连接的时候,认证的用户 | |
不设置的话,默认为不需要用户。 非必须设置 |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"regexp" | |
) | |
func main() { |
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
Redis::connection()->del('queues:myqueue'); |
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
Would the following definitions work for the documentation ? | |
reread - Reread supervisor configuration. Do not update or restart the running services. | |
update - Restart service(s) whose configuration has changed. Usually run after 'reread'. | |
reload - Reread supervisor configuration, reload supervisord and supervisorctl, restart services that were started. | |
restart - Restart service(s) | |
https://github.com/Supervisor/supervisor/issues/720#issuecomment-359222022 |
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
# Go parameters | |
GOCMD=go | |
GOBUILD=$(GOCMD) build | |
GOCLEAN=$(GOCMD) clean | |
GOTEST=$(GOCMD) test | |
GOGET=$(GOCMD) get | |
BINARY_NAME=mybinary | |
BINARY_UNIX=$(BINARY_NAME)_unix |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type AppInterface interface { | |
run() *App | |
} |
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
var fs = require("fs"); | |
function main() { | |
fs.readdir("./node_modules", function (err, dirs) { | |
if (err) { | |
console.log(err); | |
return; | |
} | |
dirs.forEach(function(dir){ | |
if (dir.indexOf(".") !== 0) { |
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 artisan optimize --force | |
php artisan route:cache | |
php artisan config:cache | |
php artisan clear-compiled | |
php artisan route:clear | |
php artisan config:clear |