This file contains 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
function curry (fn, ...x) { | |
const lfn = fn.apply(fn, x); | |
return function (...y) { | |
return lfn.apply(lfn, y); | |
}; | |
} |
This file contains 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
function bin2dec (arg) { | |
let output = 0; | |
arg.split("").reverse().forEach((i, idx) => { | |
let v = Number(i); | |
if (v > 0) { | |
output += idx > 0 ? Math.pow(2, idx) : 1; | |
} | |
}); |
This file contains 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
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES; | |
acrobat africa alaska albert albino album | |
alcohol alex alpha amadeus amanda amazon | |
america analog animal antenna antonio apollo | |
april aroma artist aspirin athlete atlas | |
banana bandit banjo bikini bingo bonus | |
camera canada carbon casino catalog cinema | |
citizen cobra comet compact complex context | |
credit critic crystal culture david delta | |
dialog diploma doctor domino dragon drama |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am avoidwork on github. | |
* I am jasonmulligan (https://keybase.io/jasonmulligan) on keybase. | |
* I have a public key whose fingerprint is A46E 0C2C 229C 5068 236E 4D1E FD34 0167 2668 CACA | |
To claim this, I am signing this object: |
This file contains 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
{ | |
"identifier": "", | |
"sender": "", | |
"sent": "", | |
"status": "", | |
"msgType": "", | |
"scope": "", | |
"restriction": "", | |
"addresses": "", | |
"incidents": "", |
This file contains 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 lang="en"><head><title>test</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content=""><meta name="groc-document-path" content="test"><meta name="groc-project-path" content="src/test.js"><link rel="stylesheet" type="text/css" media="all" href="assets/style.css"><script type="text/javascript" src="assets/behavior.js"></script><body><div id="meta"><div class="file-path">src/test.js</div></div><div id="document"><div class="segment"><div class="comments doc-section"><div class="wrapper"><p><span class='doc-section-header'>Method renderChildViews </span></p> | |
<p>Renders collection child views.</p> | |
<p>Parameters:</p> | |
<ul> | |
<li><p><strong>collection must be an Array.</strong><br/>(- collection of child models who have views created.)</p></li> | |
<li><p><strong>$el must be an Object.</strong><br/>(- Element to append child view |
This file contains 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
filesize(500); // "500 B" | |
filesize(500, {bits: true}); // "4 kbit" | |
filesize(265318, {base: 2}); // "259.1 KiB" | |
filesize(265318); // "265.32 kB" | |
filesize(265318, {round: 0}); // "265 kB" | |
filesize(265318, {output: "array"}); // [265.32, "kB"] | |
filesize(265318, {output: "object"}); // {value: 265.32, symbol: "kB", exponent: 1, unit: "kB"} | |
filesize(1, {symbols: {B: "Б"}}); // "1 Б" | |
filesize(1024); // "1.02 kB" | |
filesize(1024, {exponent: 0}); // "1024 B" |
This file contains 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
-- ---------------------------- | |
-- Procedure structure for `sp_split` | |
-- ---------------------------- | |
DROP PROCEDURE IF EXISTS `sp_split`; | |
delimiter ;; | |
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_split`(IN toSplit text, IN target char(255)) | |
BEGIN | |
# Temp table variables | |
SET @tableName = 'tmpSplit'; | |
SET @fieldName = 'variable'; |
This file contains 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
# The second SET statement is optional, and could be ignored if you have a well formed delimited string | |
SET @var = 'test, w00t, w00tz'; | |
SET @var := REPLACE(@var, ' ', ''); | |
SET @var := CONCAT("('", REPLACE(@var, ",", "'),('"), "')"); | |
SET @sql := CONCAT('INSERT INTO table VALUES ', @var); | |
# Verify the query, exeute via prepared statement | |
SELECT @sql AS `query`; |
This file contains 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
BEGIN | |
DECLARE `uuid` CHAR(50); | |
DECLARE parent CHAR(255); | |
DECLARE singular CHAR(255); | |
DECLARE source CHAR(255); | |
SET `uuid` = (SELECT udf_uuid(guid)); | |
SET parent = (SELECT udf_type(guid)); | |
SET singular = (SELECT udf_singular(type)); | |
SET source = (SELECT CONCAT(type, udf_capitalize(parent), 's')); |