Skip to content

Instantly share code, notes, and snippets.

@largepuma
largepuma / makeTemplate.js
Created September 3, 2018 12:50 — forked from malko/makeTemplate.js
dynamic es6 template string to template methods
//const tpl = makeTemplate('hello ${name}')
//const name = 'world';
//tpl({name});
const makeTemplate = (templateString) => {
return (templateData) => new Function(`{${Object.keys(templateData).join(',')}}`, 'return `' + templateString + '`')(templateData);
}
@largepuma
largepuma / gist:1512729
Created December 23, 2011 01:47
csdn passwords
('123456789', 235039)
('12345678', 212761)
('11111111', 76348)
('dearbook', 46053)
('00000000', 34953)
('123123123', 20010)
('1234567890', 17794)
('88888888', 15033)
('111111111', 6995)
('147258369', 5966)
@largepuma
largepuma / python.py
Created October 9, 2011 09:45
Hello Python
#!/usr/bin/env python
print 'Hello World!'