Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
- Take the
download.shfile and put it into a directory where you want the files to be saved. cdinto the directory and make sure that it has executable permissions (chmod +x download.shshould do it)- Run
./download.shand wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
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
| //JavaScript implementation of winding number algorithm to determine whether a point is inside a polygon | |
| //Based on C++ implementation of wn_PnPoly() published on http://geomalgorithms.com/a03-_inclusion.html | |
| function pointInPolygon(point, vs) { | |
| const x = point[0], y = point[1]; | |
| let wn = 0; | |
| for (let i = 0, j = vs.length - 1; i < vs.length; j = i++) { | |
| let xi = vs[i][0], yi = vs[i][1]; | |
| let xj = vs[j][0], yj = vs[j][1]; |
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 http = require('http'); | |
| const log = console.log; | |
| console.log = (...args) => { | |
| log.apply(console, [new Date().toISOString()].concat(args)); | |
| }; | |
| const port = process.argv[2]; | |
| const server = http.createServer((req, res) => { | |
| console.log('Incoming request'); |
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
| #!/bin/bash | |
| # This script subscribes to a MQTT topic using mosquitto_sub. | |
| # On each message received, you can execute whatever you want. | |
| while true # Keep an infinite loop to reconnect when connection lost/broker unavailable | |
| do | |
| mosquitto_sub -h "127.0.0.1" -t "test" | while read -r payload | |
| do | |
| # Here is the callback to execute whenever you receive a message: |
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
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu/bionic64" | |
| config.vm.provider :virtualbox do |v| | |
| v.gui = true | |
| v.memory = 2048 | |
| end | |
| # Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"` | |
| # to make synced folder works. |
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 ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "github.com/pkg/sftp" | |
| "golang.org/x/crypto/ssh" | |
| kh "golang.org/x/crypto/ssh/knownhosts" |
OlderNewer
