Skip to content

Instantly share code, notes, and snippets.

View romainl's full-sized avatar
💰
Alwayz Into Somethin'

Romain Lafourcade romainl

💰
Alwayz Into Somethin'
  • Razorfish France
  • Paris, France
View GitHub Profile

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log > requests.txt
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 14, 2022 23:21
What's the longest keyword sequence in Javascript?
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active April 7, 2024 18:33
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@freedmand
freedmand / tester.js
Last active November 7, 2018 11:13
JavaScript unit testing in under 30 lines
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active February 13, 2024 14:30
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@ArtBIT
ArtBIT / thou shall not pusg merge commits.txt
Last active August 6, 2022 16:41
PUSH REJECTED BY EVIL DRAGON BUREAUCRATS
+---------------------------------------------------------------+
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
+---------------------------------------------------------------+
\
\ ^ /^
\ / \ // \
\ |\___/| / \// .\
\ /V V \__ / // | \ \ *----*
/ / \/_/ // | \ \ \ |
@___@` \/_ // | \ \ \/\ \
@igemnace
igemnace / vim_and_definitions.md
Last active March 7, 2022 22:45
"Jump to Definition" in Vim

Vim and Definitions

Did you know Vim has a few builtin features designed to help with the "Jump to Definition" action you see in most IDEs?

Level 1: include and define

Since Vim is a "dumb" editor (that is, it doesn't do any static analysis on your text), you'd expect a "Jump to Definition" feature that relies on a simple text search.

@igemnace
igemnace / vim_and_grep.md
Created April 19, 2018 06:07
Working with Grep and Vim

Working with Grep and Vim

The demo: [asciinema][1]

This workflow is in thanks to [a Reddit post by romainl][2].

Opening grep results directly in Vim

Sometimes, you just want to know where a string is found. In these cases, a simple

@PeterRincker
PeterRincker / Y.vim
Last active December 24, 2020 15:27
Exposing your clipboard over SSH
" Add line to remote vimrc file
" :[range]Y - send [range] lines to remote-pbcopy via netcat.
command! -range Y silent <line1>,<line2>w !nc localhost 5556
@BoltsJ
BoltsJ / qfsign.vim
Last active December 5, 2022 06:30
Automatically place signs based on the quickfix list.
if exists('g:loaded_qfsign')
finish
endif
let g:loaded_qfsign=1
sign define QFErr texthl=QFErrMarker text=E
sign define QFWarn texthl=QFWarnMarker text=W
sign define QFInfo texthl=QFInfoMarker text=I
augroup qfsign