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 helm-tls() { | |
flag="" | |
if [[ "$1" == "delete" ]] || [[ "$1" == "diff" ]] || [[ "$1" == "get" ]] || [[ "$1" == "history" ]] || [[ "$1" == "install" ]] || [[ "$1" == "list" ]] || [[ "$1" == "reset" ]] || [[ "$1" == "rollback" ]] || [[ "$1" == "status" ]] || [[ "$1" == "test" ]] || [[ "$1" == "upgrade" ]] || [[ "$1" == "version" ]]; then | |
flag="--tls" | |
fi | |
helm ${1+"$@"} $flag | |
} |
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 main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
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
(function() { | |
var time=9500 | |
var doc = window.document.querySelector('iframe.app_canvas_frame').contentDocument; | |
var all = doc.querySelectorAll('a[class="del del_btn author_display"]') | |
console.log(all.length) | |
if(all.length==0){ | |
setTimeout(function(){location=location},time); | |
return | |
} | |
for (var i = 0; i < all.length; i++) { |
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
<? | |
/** | |
* 优先级任务管理 | |
* Class Muti_Task | |
*/ | |
class Muti_Task { | |
public $queue = array(); |
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
/* | |
有两个数组a,b,大小都为n,数组元素的值任意整形数,无序; | |
要求:通过交换a,b中的元素,使[数组a元素的和]与[数组b元素的和]之间的差最小。 | |
*/ | |
function split_arr(arr1, arr2) { | |
var diff, diff2, t, v,min_diff; | |
console.log('init') |
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
var fs = require('fs'), | |
util = require('util'), | |
Stream = require('stream').Stream; | |
/** | |
* Create a bandwidth limited stream | |
* | |
* This is a read+writeable stream that can limit how fast it | |
* is written onto by emitting pause and resume events to | |
* maintain a specified bandwidth limit, that limit can |
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
html test | |
html |
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
<meta http-equiv="X-UA-Compatible" content="IE=7" /> |