MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "net/http" | |
| "os" |
| func Unzip(src, dest string) error { | |
| reader, err := zip.OpenReader(src) | |
| if err != nil { | |
| return err | |
| } | |
| defer reader.Close() | |
| for _, f := range reader.File { |
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\VisualStudio\Setup] | |
| "SharedInstallationPath"="C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared" | |
| "CachePath"="D:\\C_Shared\\ProgramData\\Package Cache" | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup] | |
| "CachePath"="D:\\C_Shared\\ProgramData\\Package Cache" | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup] |
| /* | |
| json的Marshal 用来对slice,map,struct等结构化类型数据转义成[]byte/string, | |
| UnMarshal方法是用来对[]byte/string转义成指定结构的interface。但在处理html标 | |
| 签字符中,会存在转义问题。Marshal方法默认把html标签中的'<', '>' , '&'字符转义 | |
| 成unicode,为强制为有效UTF-8的JSON字符串,用Unicode替换符号替换无效字节。 | |
| 字符串类型encode成json串时,会被强制转义成有效utf-8编码,同时会把utf-8无法识别 | |
| 的字符用uncode代替。尖括号“<”和“>”被转义为“\ u003c”和“\ u003e”,以防止某些浏 | |
| 览器将JSON输出误解为HTML。出于同样的原因,标签“&”也被转移到“\ u0026”。 可以使 | |
| 用在其上调用SetEscapeHTML(false)的编码器禁用此转义。 |
| package main | |
| import "fmt" | |
| import "encoding/json" | |
| func main() { | |
| json_list_str := `[{"ID":"7fab2946-9d9c-39d0-387e-a0239cf95351","Node":"consul-4","Address":"192.168.15.113","Datacenter":"dc1","TaggedAddresses":{"lan":"192.168.15.113","wan":"192.168.15.113"},"NodeMeta":{"consul-network-segment":""},"ServiceKind":"","ServiceID":"web4","ServiceName":"web4","ServiceTags":["master"],"ServiceAddress":"192.168.15.113","ServiceWeights":{"Passing":1,"Warning":1},"ServiceMeta":{},"ServicePort":8082,"ServiceEnableTagOverride":false,"ServiceProxyDestination":"","ServiceProxy":{},"ServiceConnect":{},"CreateIndex":2974,"ModifyIndex":2974}]` | |
| var result []map[string]interface{} |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "sync" | |
| ) | |
| type FailLock struct { | |
| mu *sync.Mutex |
| package main | |
| import ( | |
| "fmt" | |
| "sort" | |
| ) | |
| func main() { | |
| m := map[string]int{ | |
| "something": 10, |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # utf-8 中文编码 | |
| import glob | |
| import os,sys | |
| import json | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| import time, sys,iptc # iptc 包通过 sudo pip install python-iptables 安装 | |
| from datetime import datetime |