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
const http = require('http') | |
const crypto = require('crypto') | |
const server = http.createServer((req, res) => { | |
console.log('got request', req.url) | |
res.writeHead(200, { 'Content-Type': 'text/plain' }) | |
res.end('okay') | |
}) | |
server.on('upgrade', function (req, socket) { |
Get the metadata and content of all files in a given GitHub repo using the GraphQL API
You might want to get a tree summary of files in a repo without downloading the repo, or maybe you want to lookup the contents of a file again without download the whole repo.
The approach here is to query data from GitHub using the Github V4 GraphQL API.
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
#### General PFCTL Commands #### | |
$ pfctl -d disable # packet-filtering | |
$ pfctl -e enable # packet-filtering | |
$ pfctl -q # run quiet | |
$ pfctl -v -v # run even more verbose | |
#### Loading PF Rules #### | |
$ pfctl -f /etc/pf.conf # load /etc/pf.conf | |
$ pfctl -n -f /etc/pf.conf # parse /etc/pf.conf, but dont load it | |
$ pfctl -R -f /etc/pf.conf # load only the FILTER rules | |
$ pfctl -N -f /etc/pf.conf # load only the NAT rules |
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
/***************************************************************************** | |
MIT License, http://www.opensource.org/licenses/mit-license.php | |
Contact: help@sqlworkbooks.com | |
Copyright (c) 2018 SQL Workbooks LLC | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom |
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
// 已知有如下可用类型 | |
public interface ITextWriter { | |
void Write(string text); | |
void Write(string text, int startIndex, int count); | |
void Write(char[] chars); | |
void Write(char[] chars, int startIndex, int count); | |
} | |
// 需实现以下类型,输出value对应的字符串(不考虑本地化)。 |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
NewerOlder