Skip to content

Instantly share code, notes, and snippets.

View simonuvarov's full-sized avatar

Simon simonuvarov

View GitHub Profile
/**
/* An attempt to make the error handling process described on Khalil Stemmler's excellent
/* blog a little somewhat simpler.
/* https://khalilstemmler.com/articles/enterprise-typescript-nodejs/functional-error-handling/
/**
// Left and Right classes, but more specific to error handling.
class Failure<L, A = any> {
readonly error: L;
@jhaddix
jhaddix / content_discovery_all.txt
Created May 26, 2018 11:51
a masterlist of content discovery URLs and files (used most commonly with gobuster)
This file has been truncated, but you can view the full file.
`
~/
~
ים
___
__
_
---
@jcreedcmu
jcreedcmu / escape.js
Created February 19, 2018 18:09
Escaping nodejs vm
////////
// The vm module lets you run a string containing javascript code 'in
// a sandbox', where you specify a context of global variables that
// exist for the duration of its execution. This works more or less
// well, and if you're in control of the code that's running, and you
// have a reasonable protocol in mind// for how it expects a certain
// context to exist and interacts with it --- like, maybe a plug-in
// API for a program, with some endpoints defined for it that do
// useful domain-specific things --- your life can go smoothly.
@olih
olih / jq-cheetsheet.md
Last active April 20, 2024 06:34
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@BuffaloWill
BuffaloWill / cloud_metadata.txt
Last active April 16, 2024 04:15
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
@manigandham
manigandham / rich-text-html-editors.md
Last active March 13, 2024 23:51
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@paulirish
paulirish / what-forces-layout.md
Last active April 29, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@darrenpmeyer
darrenpmeyer / openconnect-7-ubuntu-build.md
Last active June 10, 2020 16:24
Building OpenConnect 7 on Ubuntu 14 (trusty), 15 (vivid), and 16 (xenial)
@MWins
MWins / CSS-Best Practices.md
Last active June 6, 2023 15:27
CSS best practices

What CSS best practices should I follow ?

HTML best practices Depends. How far down the rabbit hole do you want to go ?

Just need something to look good : use a frontend framework like foundation or bootstrap, won't learn much about CSS. Short list of Front End Frameworks

Surface level : work general to specific. Comment the sections of the CSS. Use a reset or normalizer. Work on patterns, use classes over IDs for reuse. CSS Resets - includes normalize.css Don't have links for the other parts. see below

Little bit deeper : Look into BEM or OOCSS. Those stand for Block Element Modifier and Object Oriented CSS. Two popular methodologies for CSS. Also SMACSS.

# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer