Skip to content

Instantly share code, notes, and snippets.

View wiredearp's full-sized avatar

Wired Earp wiredearp

  • Wunderbyte
  • Denmark
View GitHub Profile
import * as A from 'fp-ts/Array';
import { pipe } from 'fp-ts/function';
import * as IO from 'fp-ts/IO';
// Space: https://unicodeplus.com/U+0020
const space = String.fromCharCode(32);
// Narrow No-Break Space: https://unicodeplus.com/U+202F
const narrowNoBreakSpace = String.fromCharCode(8239);
// Thin Space: https://unicodeplus.com/U+2009
const thinSpace = String.fromCharCode(8201);
@nicolaskopp
nicolaskopp / ios-fixed-scrolling-fix.css
Last active April 4, 2024 04:30
Fix scrolling bug on iOS Safari with fixed elements and bottom bar
/* Fix scrolling bug on iOS Safari with fixed elements and bottom bar */
body.noscroll {
height: 100%;
overflow: hidden; /* make sure iOS does not try to scroll the body first */
}
/* your wrapper, most likely mobile menu */
.fixed-wrapper {
width: 100%;
@andyvanee
andyvanee / tagProps.js
Created August 12, 2020 22:27
tagProps lit-element directive
import { directive } from "https://unpkg.com/@polymer/lit-element/lit-element.js?module"
const stateMap = new WeakMap()
export const tagProps = directive((tag, props = {}) => part => {
let state = stateMap.get(part)
const el = () => document.createElement(tag)
if (state === undefined) {
state = { tag, element: el() }
stateMap.set(part, state)
@bessfernandez
bessfernandez / setting-up-html-storybook-app.md
Last active March 28, 2023 16:37
How to setup a simple Storybook HTML demo app

icon-storybook-default

Storybook for HTML

Storybook is all about writing stories. A story usually contains a single state of one component, almost like a visual test case.

Typically you see Storybook used for React or other frameworks, but the library has recently introduced the option to use HTML for your Storybook projects. As a prototyping tool or playground this is great! No larger scale knowledge of other frameworks needed.

Install Storybook HTML

@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

#![feature(lang_items)]
#![no_std]
#[no_mangle]
pub fn add_one(x: i32) -> i32 {
x + 1
}
// needed for no_std
@gpittarelli
gpittarelli / node_prune.sh
Last active March 3, 2022 17:04
Prunes very-likely-uneeded files from node_modules directories
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean
@esamattis
esamattis / .babelrc
Last active September 12, 2018 20:55
Typescript type stripping with Babel 7 using few extra Babel plugins
{
"presets": [
"typescript",
"react",
[
"env",
{
"targets": {
"uglify": true
}
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active April 29, 2024 14:36
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);