This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UUID | |
from sqlalchemy.dialects.mysql import BINARY | |
from sqlalchemy.types import TypeDecorator | |
class BinaryUUID(TypeDecorator): | |
'''Optimize UUID keys. Store as 16 bit binary, retrieve as uuid. | |
inspired by: | |
http://mysqlserverteam.com/storing-uuid-values-in-mysql-tables/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp') | |
const gutil = require('gulp-util') | |
const rollup = require('./rollup') | |
const jsModules = [ | |
{ | |
entry: 'src/js/main.js', | |
dest: 'dist/js/main.min.js' | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>for-in vs. Object.keys vs. Сached keys vs. rorEach vs. while</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on Node REPL v4.0.0 | |
"use strict"; | |
const tests = { | |
case1: { | |
name: 'Case 1', | |
string: 'Automotive', | |
expect: 'A6e' | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"HTML5": { | |
"prefix": "html", | |
"body": [ | |
"<!DOCTYPE html>\n", | |
"<html lang=\"en\">", | |
"<head>", | |
"\t<meta charset=\"utf-8\">\n", | |
"\t<title>${title}</title>", | |
"\t<meta name=\"description\" content=\"${description}\">\n", |