Skip to content

Instantly share code, notes, and snippets.

@helloworld-du
helloworld-du / multy.php
Created April 8, 2020 04:06
99乘法表
<?php
$n=10;
for($i=1;$i<$n;$i++){
for($j=1;$j<=$i;$j++){
print_r("$j*$i=".($i*$j)."\t");
}
print_r("\n");
}
/**
@helloworld-du
helloworld-du / info.py
Created October 14, 2015 11:35
获取android设备信息, python版
#coding=utf-8
#!/usr/bin/python
import os
import re
MANU_MEIZU = "meizu"
MANU_SAMSUNG = "samsung"
MANU_HUAWEI = "huawei"
MANU_XIAOMI = "xiaomi"
@helloworld-du
helloworld-du / README.md
Last active June 14, 2019 08:56
git hook(pre commit)

pre-commit hook

by [email protected] 原始地址: pre-commit hook

功能简述

1、在提交代码(git commit)到git库时,本钩子被触发。
2、调用phpcbf和phpcs,来做代码检查并尝试自动修复代码样式。

#! /usr/bin/env php
<?php
/**
* 测试json和serialize性能
* Created by PhpStorm.
* User: dushengchen
* Date: 15/3/25
* Time: 下午3:04
*/
define('SOURCE_FILE_USER', '/Users/dushengchen/work/git/kt/rabbitmq/demo/user.log');
@helloworld-du
helloworld-du / hello_tmux
Last active August 29, 2015 14:16
tmux初试
#!/bin/bash
set -x
cmd="/usr/bin/tmux" # tmux path
session="hello_tmux" # session name
if [ -z $cmd ]; then
echo "You need to install tmux."
exit 1
fi