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
# git -P lg -5 origin/master # --cherry --no-merges | |
git config --global alias.lg "\!f() { git log --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --graph \${@:q}; }; f" | |
# git -P sl submodulePath -5 | |
git config --global alias.sl "\!f() { [[ -d \$1 ]] && cd \$1 && git log --pretty='%C(red)%h%C(reset) - %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)' \${@:2}; }; f" | |
# git -P sul submodulePath -5 | |
git config --global alias.sul "\!f(){ local IFS=\$'\n'; git submodule foreach -q '[[ \"\$name\" = \"'\$1'\" ]] && git log --pretty=\"%C(red)%h%C(reset) - %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)\" '\${@:2}' || true'; };f" |
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 | |
# bash get ip | |
declare -a api=("ifcfg.me" "ident.me" "tnx.nl/ip" "ip.appspot.com" "ifconfig.me" "curlmyip.com"); | |
IP=$(curl -s --retry 3 --retry-delay 10 ${api[0]}); | |
while [ -z "$IP" ] # If no IP | |
do | |
sleep 0.5; | |
random=$(( RANDOM % ${#api[@]} )); | |
IP=$(curl -s --retry 3 --retry-delay 10 ${api[$random]}); | |
done |
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
(function($) { | |
$.each(['show', 'hide'], function(i, ev) { | |
var el = $.fn[ev]; | |
$.fn[ev] = function() { | |
this.trigger(ev); | |
return el.apply(this, arguments); | |
}; | |
}); | |
})(jQuery); |
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 | |
// echo exec("pwd")."\n"; | |
$id = exec("git log -1 --pretty=%h"); | |
$msg = exec("git log -1 --pretty=%s"); | |
$user = exec("git log -1 --pretty=%cn\(%ce\)"); #name+email | |
$time = exec("git log -1 --pretty=%ai"); | |
exec("git diff-tree -p --no-commit-id $id", $diff); | |
$url = exec("git config --get remote.origin.url"); | |
if(empty($url)) { | |
$url = exec("git config --get remote.origin.pushurl"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Scratchcard</title> | |
</head> | |
<body> | |
<div class="box"> | |
<div class="content"> | |
<img src="http://img2.pengfu.cn/big/138/140138.jpg"> |