Skip to content

Instantly share code, notes, and snippets.

View hacksparrow's full-sized avatar

Hage Yaapa hacksparrow

View GitHub Profile
@hacksparrow
hacksparrow / vulnerability-scan-endpoints.txt
Created January 11, 2020 14:55
Vulnerability scan endpoints
185.232.64.32 - - [11/Jan/2020:13:43:07 +0000] "GET /gRmtMqyCAiQYs HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
185.232.64.32 - - [11/Jan/2020:13:43:08 +0000] "GET /GRmtMqyCAiQYs HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
185.232.64.32 - - [11/Jan/2020:13:43:08 +0000] "GET /RmtMqyCAiQYs/RmtMqyCAiQYs/RmtMqyCAiQYs HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
185.232.64.32 - - [11/Jan/2020:13:43:08 +0000] "GET /.ssh/id_dsa HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
185.232.64.32 - - [11/Jan/2020:13:43:08 +0000] "GET /.ssh/identity HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
185.232.64.32 - - [11/Jan/2020:13:43:08 +0000] "GET /.ssh/id_rsa.pub HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firef
@hacksparrow
hacksparrow / enum-pi.js
Created June 23, 2019 20:02
Enumerate the digits of Pi
function printPiDigits() {
Math.PI.toString().split('').forEach(d => {
console.log(d);
});
}
printPiDigits();
@hacksparrow
hacksparrow / web-servers.md
Created March 25, 2018 04:25 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
1. How do you change the dataSource of a hypothetical 10000 a models in model-config.json? It can be done quickly with a search-replace, but it would be good to have a default efficient way built-in to do so.
We don't provide that functionality out of the box and to be honest, I don't think it's an important feature to implement. I consider having 10k models in a single application as an anti-pattern in today's microservices-oriented world.
Another option is to allow packaging a group of LoopBack artifacts into a module and use it as a component to the main app.
2. Is there a way to conditionally apply filters? Eg: user can query for a month, but it should not be March.
My recommendation is to write a custom remote method and build the conditional filter programatically on the server side.

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser