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
| -- Levenshtein function | |
| -- Source: https://openquery.com.au/blog/levenshtein-mysql-stored-function | |
| -- Levenshtein reference: http://en.wikipedia.org/wiki/Levenshtein_distance | |
| -- Arjen note: because the levenshtein value is encoded in a byte array, distance cannot exceed 255; | |
| -- thus the maximum string length this implementation can handle is also limited to 255 characters. | |
| DELIMITER $$ | |
| DROP FUNCTION IF EXISTS LEVENSHTEIN $$ | |
| CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8) |
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
| # atom | |
| # stop ctrl-c on from wiping out what uyou have in the clipboard | |
| # prevent core:copy if and only if there's one selection in | |
| # the active editor (mini or not) and its length equals 0 | |
| atom.commands.add 'atom-text-editor', 'core:copy', (e) -> | |
| editor = e.currentTarget.getModel() | |
| # do nothing if there's more than 1 selection | |
| return if editor.getSelectedBufferRanges().length > 1 |
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
| {% comment %} | |
| Input | |
| {% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %} | |
| Remove redundant closing tags | |
| {% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %} | |
| {% capture _end %}</{{ _element }}>{% endcapture %} |
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
| var aws = require('aws-sdk'); | |
| aws.config.update({ | |
| region: 'us-east-1' | |
| }); | |
| var s3 = new aws.S3({apiVersion: '2006-03-01'}); | |
| var sqs = new aws.SQS(); | |
| var Converter = require('csvtojson').core.Converter; | |
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
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |