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 ( | |
| "encoding/binary" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "net" | |
| ) |
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
| /** | |
| * Module dependencies. | |
| */ | |
| var net = require('net'); | |
| var inherits = require('util').inherits; | |
| var EventEmitter = require('events').EventEmitter; | |
| /** |
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
Show hidden characters
| { | |
| "presets": [ | |
| [ | |
| "@babel/preset-env", | |
| { | |
| "useBuiltIns": "entry", | |
| "modules": false | |
| } | |
| ] | |
| ] |
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
| #include <arpa/inet.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <unistd.h> | |
| int main() { | |
| const char* server_name = "localhost"; | |
| const int server_port = 8877; |
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 { reactive, computed } from 'vue' | |
| const registerModules = (modules, state) => { | |
| for (const [name, module] of Object.entries(modules)) { | |
| state[name] = module.state | |
| if (module.modules) { | |
| registerModules(module.modules, module.state) | |
| } | |
| } |
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
| // ---- | |
| // Sass (v3.3.0.rc.1) | |
| // Compass (v0.13.alpha.10) | |
| // ---- | |
| body { | |
| width: 100%; | |
| height: 10em; | |
| background: mix(#ff0000, #0000bb, 75); | |
| } |
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
| $ opkg update | |
| $ opkg install stubby | |
| $ /etc/init.d/stubby enable | |
| $ nano /etc/config/dhcp | |
| # add to dnsmasq section: | |
| option noresolv '1' | |
| list server '127.0.0.1#5453' | |
| $ /etc/init.d/stubby start |
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
| /* | |
| * 安装nvm和相应npm包 | |
| * $ nvm install v8.9.4 | |
| * $ npm install keccakjs secp256k1 | |
| */ | |
| const { randomBytes } = require('crypto') | |
| const secp256k1 = require('secp256k1') | |
| const SHA3 = require('keccakjs') |
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
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
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
| var sys = require('sys'), | |
| exec = require('child_process').exec, | |
| child, | |
| http = require('http'); | |
| child = function(res, cmd) { | |
| exec(cmd, | |
| function (error, stdout, stderr) { | |
| res.end(stdout); | |
| if (error !== null) { |
NewerOlder