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
# coding=utf-8 | |
import os | |
import sys | |
import glob | |
pngcrush = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush" | |
destination = os.path.join(os.environ['HOME'], 'Desktop') | |
for ipa in sys.argv: |
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 | |
$_G['mnid'] = 'mn_N'.substr(md5('your_link'), 0, 4); | |
//地址在discuz后台主导航里面找 |
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 | |
function formattime($s) { | |
if(date('Y', $s) < date('Y')) { | |
return date('Y-n-d H:i', $s); | |
} elseif(date('G', $s) > date('G')) { | |
return date('n月d日 H:i', $s); | |
} | |
$limit = time() - $s; | |
if($limit < 60) { | |
return $limit . '秒前'; |
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 com.xmeise.mm; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.support.annotation.NonNull; | |
import android.util.AttributeSet; | |
import android.view.GestureDetector; | |
import android.view.MotionEvent; | |
import android.view.ScaleGestureDetector; |
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 | |
/** | |
* 生成mysql数据字典 | |
*/ | |
header("Content-type: text/html; charset=utf-8"); | |
// 配置数据库 | |
$dbserver = "localhost"; | |
$dbusername = "mysql用户名"; | |
$dbpassword = "mysql密码"; |
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
"不兼容vi | |
set nocompatible | |
"让删除键更好用 | |
set backspace=2 | |
"不创建撤销文件 | |
set noundofile | |
"取消自动备份 | |
set nobackup | |
"自动缩进 | |
set autoindent |
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 | |
# 自动创建组和仓库,自动上传仓库 | |
# 配置选项 | |
gitlab_access_token='your personal access token' | |
gitlab_base_url='http://gitlab.demo.com/api/v4' | |
repositorys=( | |
"xxxx" | |
"xxxx" | |
) |
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/env bash | |
function install_base() { | |
general_user='admin' | |
cat /etc/passwd | grep ${general_user} > /dev/null 2>&1 | |
if [[ $? -eq 0 ]]; then | |
echo "User ${general_user} Exists" | |
else | |
sudo useradd -u 2000 -s /sbin/nologin ${general_user} | |
fi |
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 | |
local_archive_path=$1 | |
function get_filename_from_url() { | |
download_url=$1 | |
file_with_query_params=$(echo "${download_url##*/}") | |
file=$(echo "${file_with_query_params%%\?*}") | |
echo ${file} | |
} |
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 | |
function get_filename_from_url() { | |
download_url=$1 | |
file_with_query_params=$(echo "${download_url##*/}") | |
file=$(echo "${file_with_query_params%%\?*}") | |
echo ${file} | |
} | |
php_download_url='http://xx.com/php-7.3.7.tgz' |