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/[email protected]/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, |
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 | |
tcpdump -nni lo icmp |
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 | |
# requirements: apt install nmap htop aha | |
# (aha is ANSI color to HTML converter) | |
ncat -k -l -p 9999 -c "echo 'HTTP/1.1 200 OK\nContent-type: text/html\nconnection: close\\n'; echo q | htop | aha --black --line-fix" |
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 | |
grep -rhoE '\w+{3,10}' --exclude-dir=node_modules --exclude-dir='.git' . | sort | uniq -c | sort -n | tail -n 100 |