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
/* HOC fundamentally is just a function that accepts a Component and returns a Component: | |
(component) => {return componentOnSteroids; } or just component => componentOnSteroids; | |
Let's assume we want to wrap our components in another component that is used for debugging purposes, | |
it just wraps them in a DIV with "debug class on it". | |
Below ComponentToDebug is a React component. | |
*/ | |
//HOC using Class | |
//it's a function that accepts ComponentToDebug and implicitly returns a Class | |
let DebugComponent = ComponentToDebug => class extends Component { |
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
payload = self._post( | |
'/Record.List', {'domain': self.options['domain']}) | |
logger.debug('payload: %s', json.dumps(payload)) | |
records = [] | |
for record in payload['records']: | |
processed_record = { | |
'type': record['type'], | |
'name': self._full_name(record['name']), | |
'ttl': record['ttl'], | |
'content': record['value'], |
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
{"sig":"42fe1d91e9f582307877aca4599e80affb8d0bf273a6414d090bc12d39987ff7ad40cf242ec31b05071ae394c7b2da7cc57ccdc0d3bf4bcaf5ad7c722545e6a80","msghash":"97e9ded1cc1b432245faae8686c8c0ca01f6553b410f95c0d77bb5565241bc99"} |
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
events { | |
worker_connections 1024; | |
} | |
http { | |
# The "auto_ssl" shared dict should be defined with enough storage space to | |
# hold your certificate data. 1MB of storage holds certificates for | |
# approximately 100 separate domains. | |
lua_shared_dict auto_ssl 1m; | |
# The "auto_ssl" shared dict is used to temporarily store various settings |
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 ShadowsocksKcp < Formula | |
@name="shadowsocks-kcp" | |
desc "Kcptun for speed up shadowsocks" | |
# homepage "https://github.com/xtaci/kcptun" | |
# url "https://github.com/xtaci/kcptun/releases/download/v20161207/kcptun-darwin-amd64-20161207.tar.gz" | |
# url "http://data.vvfox.com/tools/shadowsocks-kcp-1.0.0.tar" | |
# sha256 "751f79884e83510d6052f6d04908115f6e141b779f2b00882e4019ea2b0bbd58" | |
# head "https://github.com/xtaci/kcptun.git" |
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 ShadowsocksGetui < Formula | |
desc "Kcptun for speed up shadowsocks over gt3d" | |
# homepage "https://github.com/xtaci/kcptun" | |
# url "https://github.com/xtaci/kcptun/releases/download/v20161207/kcptun-darwin-amd64-20161207.tar.gz" | |
url "http://data.vvfox.com/tools/shadowsocks-getui-1.0.0.tar" | |
# sha256 "751f79884e83510d6052f6d04908115f6e141b779f2b00882e4019ea2b0bbd58" | |
# head "https://github.com/xtaci/kcptun.git" | |
# bottle do | |
# cellar :any |
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 Kcptun < Formula | |
desc "Kcptun for speed up shadowsocks" | |
homepage "https://github.com/xtaci/kcptun" | |
url "https://github.com/xtaci/kcptun/releases/download/v20180810/kcptun-darwin-amd64-20180810.tar.gz" | |
sha256 "d7712c773d04e1b79a36e8a277860d68a6effc061daefe67d97c3357692b26e3" | |
head "https://github.com/xtaci/kcptun.git" | |
# bottle do | |
# cellar :any | |
# sha256 "751f79884e83510d6052f6d04908115f6e141b779f2b00882e4019ea2b0bbd58" => :sierra |
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 socks5 | |
import ( | |
"net" | |
"time" | |
"bytes" | |
"errors" | |
"bufio" | |
"strconv" | |
"strings" |
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
VirtualBox VM 5.0.0 r101573 win.amd64 (Jul 9 2015 11:08:16) release log | |
00:00:04.186165 Log opened 2015-08-02T16:18:59.366501500Z | |
00:00:04.186166 Build Type: release | |
00:00:04.186170 OS Product: Unknown NT v10.0 | |
00:00:04.186171 OS Release: 10.0.10240 | |
00:00:04.186172 OS Service Pack: | |
00:00:04.235083 DMI Product Name: TA870+ | |
00:00:04.246082 DMI Product Version: | |
00:00:04.246094 Host RAM: 10239MB total, 4539MB available | |
00:00:04.246096 Executable: C:\Program Files\Oracle\VirtualBox\VirtualBox.exe |
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
type ( | |
// BuoyCondition contains information for an individual station. | |
BuoyCondition struct { | |
WindSpeed float64 `bson:"wind_speed_milehour"` | |
WindDirection int `bson:"wind_direction_degnorth"` | |
WindGust float64 `bson:"gust_wind_speed_milehour"` | |
} | |
// BuoyLocation contains the buoy's location. | |
BuoyLocation struct { |
NewerOlder