该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forums 的 baozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull
在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003
<?php | |
if (count($argv) < 2) { | |
echo "Usage: php curl.php http://haoip.cn" . PHP_EOL; | |
exit; | |
} | |
$url=$argv[1]; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
var urls = []string{ | |
"http://pulsoconf.co/", |
该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forums 的 baozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull
在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003
/* | |
Adobe Systems Incorporated(r) Source Code License Agreement | |
Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved. | |
Please read this Source Code License Agreement carefully before using | |
the source code. | |
Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive, | |
no-charge, royalty-free, irrevocable copyright license, to reproduce, | |
prepare derivative works of, publicly display, publicly perform, and |
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
''' | |
@author: snooda | |
@website: www.snooda.com | |
@License: GNU GPL v3 | |
A script to show OpenVZ resource message friendly | |
''' | |
import sys |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
struct resource_t { | |
char name[32]; | |
long long held; | |
long long maxheld; | |
long long barrier; |
#步骤(How to use it)
redis-cli -h 192.168.1.1 -p 6371 script load "$(cat redis_size.lua)"
evalsha 78331e1d4741cad34084d357e19ce6dbca8e202e 0 test_key // 注意与上步返回的一致
__author__ = 'baozi' | |
import Image | |
img_file = '1.jpg' | |
proportion = 0.3 |
__author__ = 'baozi' | |
import Image,glob,os,colorsys | |
img_file = '1.jpg' | |
img_file_new = 'douwa_new.png' | |
direct = 'h' | |
z = 1 |
/** | |
* @param {number[]} nums | |
* @return {number} | |
*/ | |
function find(nums, v) { | |
for (var j in nums) { | |
if (v == nums[j]) { | |
return true | |
} |