Skip to content

Instantly share code, notes, and snippets.

2016/11/25 09:47:39 [19567] params.c:Parameter() - Ignoring badly formed line in config file: ignore errors
2016/11/25 09:47:39 [19567] name lookup failed for 119.162.158.222: Name or service not known
2016/11/25 09:47:39 [19567] connect from UNKNOWN (119.162.158.222)
2016/11/25 01:47:39 [19567] rsync on ftpuserhome/13/test/ from rsyncer@UNKNOWN (119.162.158.222)
2016/11/25 01:47:39 [19567] building file list
2016/11/25 01:47:39 [19567] 2016/11/25 01:47:39 119.162.158.222 ftpuserhome 13/test/1234.jpg 83186
2016/11/25 01:47:39 [19567] sent 83,292 bytes received 55 bytes total size 83,135
2016/11/25 09:53:21 [19640] params.c:Parameter() - Ignoring badly formed line in config file: ignore errors
2016/11/25 09:53:21 [19640] name lookup failed for 119.162.158.222: Name or service not known
2016/11/25 09:53:21 [19640] connect from UNKNOWN (119.162.158.222)
/*genarate javascript namspace function*/
var _ns= {};
_ns.genNameSpace= function(path, loseMe){
var reg = /^[_$a-z]+[_$a-z0-9]*/i;
var nsAr = path.split('.');
var stringCommond = "";
var stringNS = "";
var n = loseMe ? nsAr.length - 1 : nsAr.length;
for (var i = 0; i < n; i++){
if(!reg.test(nsAr[i])) {
@rming
rming / launch-gce-shadowsocks.sh
Created May 2, 2017 07:41 — forked from nk23x/launch-gce-shadowsocks.sh
Shadowsocks on GCE automation scripts
#!/bin/bash
machine_type=f1-micro
image=ubuntu-14-04
gcloud compute instances create shadowsocks-1 \
--can-ip-forward --image $image --restart-on-failure \
--zone asia-east1-b --machine-type $machine_type \
--metadata-from-file startup-script=bin/shadowsocks-startup.sh
@rming
rming / whoami
Created June 9, 2017 07:24
php后期静态绑定
<?php
class A {
public static $name = null;
public static function whoami() {
if (!static::$name) {
static::$name = get_called_class();
}
return static::$name;
}
}
<?php
class fileCacheHandler
{
private static $_instance = null;
private static $cacheDir = "/dev/shm/cache_file/";
public static function getInstance()
{
if (!static::$_instance) {
static::$_instance = new static;
}
<?php
class redisFileCacheHandler
{
private static $_instance = null;
private static $cacheDir = "filecache:";
protected $redisWrite = null;
public static function getInstance()
{
if (!static::$_instance) {
static::$_instance = new static;
@rming
rming / Singleton.php
Created July 21, 2017 02:38
php Singleton
abstract class Singleton
{
private static $instances = array();
protected function __construct() {}
public static function getInstance()
{
$class = get_called_class();
if (!isset(self::$instances[$class])) {
self::$instances[$class] = new static();
}
@rming
rming / 1) Install
Created July 31, 2017 08:27 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@rming
rming / How-to-clear-the-local-DNS-cache
Last active August 4, 2017 07:47
How to clear the local DNS cache
#How to clear the local DNS cache
#macOS Sierra 10.12.0
sudo killall -HUP mDNSResponder
#OSX 10.11.0
sudo killall -HUP mDNSResponder
#OSX 10.10.4
sudo killall -HUP mDNSResponder
@rming
rming / centos-6-chinese-shell
Created August 9, 2017 10:51
centos-6-chinese-shell
1.查看系统支持的字符集
# locale -a
2.更改系统支持的字符集支持
# vi /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"