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
const s = document.createElement('script'); | |
s.setAttribute( | |
'src', | |
'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js' | |
); | |
document.head.appendChild(s); | |
const sall = () => { | |
try { | |
$('a[action-type="batselect"]')[0].click(); |
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 main | |
import( | |
"os/exec" | |
"os" | |
"fmt" | |
) | |
func main() { | |
devices := getDevices() | |
fmt.Println(devices) |
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 main | |
import( | |
"strings" | |
"fmt" | |
) | |
func main() { | |
lines := "194 Temperature_Celsius 0x0022 037 045 000 Old_age Always - 37 (0 6 0 0 0)" | |
useSplit(lines) |
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
""" | |
# table schema | |
CREATE TABLE raw.disk_storage ( | |
machine_id text, | |
date date, | |
timestamp timestamp, | |
available bigint, | |
total bigint, | |
used bigint, | |
PRIMARY KEY ((machine_id, date), timestamp) |
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 main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
client "github.com/docker/engine-api/client" | |
"github.com/docker/engine-api/types" | |
"log" | |
"os" |
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 java.util.Date | |
import java.text.SimpleDateFormat | |
object TS2Date { | |
def main(args: Array[String]): Unit = { | |
val ts:BigInt = 1480665459 | |
val df:SimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd") | |
val date:String = df.format(ts.toLong) | |
//ret: String = 1970-01-18 | |
} | |
} |
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 utils | |
import( | |
"fmt" | |
"time" | |
) | |
func SubIntervalTime(interval int64) string { | |
t0 := time.Now() | |
fmt.Println("t0:", t0.Format("2006-01-02 15:04:05")) |
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( | |
"fmt" | |
"strconv" | |
"strings" | |
"os/exec" | |
"log" | |
) | |
func main() { | |
out, _ := exec.Command("df", "-P").Output() |