Skip to content

Instantly share code, notes, and snippets.

View temberature's full-sized avatar

Tong temberature

  • USA
View GitHub Profile
git init
git add
git commit -m ""
git status
git log --pretty=oneline
git reset --hard HEAD^//回到上个版本的状态
git reset --hard 2434//
git reflog //记录
git diff HEAD readme.txt
git checkout readme.txt // 没有暂存,回到版本;暂存,回到暂存
ifconfig | grep "inet " | grep -v 127.0.0.1
awk '$10 == 200 {print $8}' weixin_access_log.20150206 | grep 'cf2015/cf.*\.php$' | sort | uniq -c
awk -F '[,]' //指定分隔符
54.65.110.84
/bin - Common binaries
/sbin - Binaries used for system administration.
/boot - Static files of the boot loader. Usually it contain the Linux kernel, Grub boot loader files and so on.
@temberature
temberature / simulatePOST.php
Created March 2, 2015 11:02
php模拟提交表单
<?php
//模拟POST上传文件
$post = array('callbackurl' => '/idcard/', 'action' => 'idcard', 'img' => '@20070627114712.jpg'); //POST提交内容
$url = "http://ocr.ccyunmai.com/UploadImg.action"; //上传地址
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); //URL
curl_setopt($ch, CURLOPT_POST, 1); //模拟POST
curl_setopt($ch, CURLOPT_POSTFIELDS, $post); //POST内容
// curl_setopt($ch, CURLOPT_HEADER, true);
$headers = array(
@temberature
temberature / Bundle.md
Last active September 6, 2015 06:02 — forked from JeOam/Bundle.md
Get Bundle ID of Any App

获取应用的 Bundle ID 方法:在 iTools 下,找到 app 名字命名的文件夹 xxx.app,找到 Info.plist,导出,Xcode 打开。

得到 Bundle ID 如:

com.tencent.mipadqq  iPad 版 QQ 4.1
com.tencent.xin  微信 5.3.1.17
var numberInput = {
options: {
$wrap: $('.numberCheckInput'),
headZero: false,
decimalPlace: 2,
min: 0,
max: 0,
required: true,
tips: {
max: "金额不能高于",
require(['jquery', 'core', 'pj.appcore'], function($, Core, AppCore) {
'use strict';
var aop = {
before: function(fn, beforeFn) {
return function () {
beforeFn.apply(this, arguments);
fn.apply(this, arguments);
}
},
check: function(fn, beforeFn) {
initMarquee: function (speed) {
var me = this;
var $marquee = $('.m-marquee');
$marquee.show();
var $container = $marquee.find('.container');
var $firstMsg = $marquee.find('.message').eq(0);
if (!$container.length) {
return;
}
var startPos = parseFloat($marquee.css('width')) - parseFloat($firstMsg.css('padding-left'));
var bulletinBoard = {
OPTIONS: {
$wrap: '',
interval: 3000,
switchTime: 1000
},
cache: {},
init: function(options) {
var me = this,
ca = me.cache;
@temberature
temberature / readable.js
Last active November 22, 2018 07:32
performace.timing readable
Object.entries(performance.timing.toJSON()).forEach(time => {
console.log(Number((time[1] - performance.timing.navigationStart)/1000).toFixed(2), time[0]);
})
@temberature
temberature / index.html
Created November 15, 2018 13:05
chrome://newtab/
<!doctype html>
<html dir="ltr"
hascustombackground="false"
bookmarkbarattached="false"
lang="zh"
class="md">
<head>
<meta charset="utf-8">
<title>新标签页</title>
<meta name="viewport" content="width=device-width">