This file contains hidden or 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 | |
define("DES_KEY", "SCUBEPGW"); | |
define("HASH_PAD", "0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003021300906052b0e03021a05000414"); | |
bcscale(0); | |
$private_key = array(); | |
if (!function_exists('hex2bin')) | |
{ | |
function hex2bin($hexdata) | |
{ | |
$bindata = ''; |
This file contains hidden or 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 hidden or 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 hidden or 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 | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull 2>& 1' ); | |
echo 'success'; | |
} |
This file contains hidden or 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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
/** |
This file contains hidden or 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 hidden or 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 | |
# Get API Token from http://fir.im/apps | |
API_TOKEN="your API token" | |
PACKAGE_PATH="demo-release.apk" | |
# ios or android | |
TYPE="android" | |
# App 的 bundleId | |
BUNDLE_ID="com.demo.app" |
This file contains hidden or 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 | |
ADB_PATH="/Users/lee/Library/Android/sdk/platform-tools" | |
PACKAGE_NAME="com.yourcompany.app" | |
DB_NAME="default.realm" | |
DESTINATION_PATH="/Users/lee/Downloads/${DB_NAME}" | |
NOT_PRESENT="List of devices attached" | |
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
echo "Make sure a device is connected" | |
else |
This file contains hidden or 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 hidden or 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 |