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
| //require https://github.com/w8r/Leaflet.Path.Drag | |
| var imagePoly = [ | |
| imageBounds.getNorthEast(), | |
| imageBounds.getNorthWest(), | |
| imageBounds.getSouthWest(), | |
| imageBounds.getSouthEast() | |
| ]; | |
| var poly = new L.Polygon([imagePoly], { | |
| //draggable:true, |
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 php | |
| <?php | |
| ob_start(); | |
| if(isset($argv[1])) | |
| $outfile = $argv[1]; | |
| else | |
| $outfile = 'index.html'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-10} | head -n 10 | |
| head -c32 /dev/urandom | xxd -c 64 -p | |
| xxd -c 32 -p /dev/urandom | head -n1 |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title></title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <link href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" rel="stylesheet" type="text/css" /> | |
| <style> | |
| #map { | |
| position: absolute; | |
| top: 0; |
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
| /* | |
| usage: | |
| cat config.template.yml | VAR1=test node envtmpl.js > config.valued.yml | |
| */ | |
| const fs = require('fs'); | |
| //const tmplReg = /\$\{(.+?)\}/g | |
| const tmplReg = /\$\{([\w_\-]+)\}/g | |
| //const tmplReg = /\{ *([\w_\-]+) *\}/g |
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
| /* | |
| set windows border width to Linux Unbuntu as window manager: metacity,marco | |
| usage(run by root): | |
| $ npm i cheerio | |
| $ sudo wget -O- https://gist.githubusercontent.com/stefanocudini/0a7c06c202e6a61ddd8e67430717c023/raw/df8d9d8da9d9dce5a4af7c45e18b3e2280e9c184/ubuntu-windows-border-width.js | nodejs | |
| */ | |
| const cp = require('child_process'); | |
| const fs = require('fs'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 http = require('http'); | |
| http.createServer(onRequest).listen(3000); | |
| function onRequest(client_req, client_res) { | |
| console.log('serve: ' + client_req.url); | |
| var options = { | |
| hostname: 'www.google.com', | |
| port: 80, |