copy pre-commit
into the repo's .git/hooks/
folder, then try committing a file that has the string DO_NOT_COMMIT_THIS
in it.
The recommended usage of [redux-loop]'s [Cmd.run
] lacks type safety, which is
problematic when a project relies on TypeScript.
Firstly, the args
are typed any
, and will not error when they don't match
the arguments of the function to be run.
Second, the arguments to successActionCreator
don't need to match the
return type of the function to be run.
Replace usages of Cmd.run
with typesafeCmdRun
to get type safety.
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
jQuery.ready(function(){ | |
let target = $('[data-ng-show="payment.paymentType === PaymentType.InternetBanking && canPayBy(PaymentType.InternetBanking)"]') | |
let temporaryMessage = '<p><strong>Poli Payments are temporarily unavailable.'+ | |
' If you are unable to pay with credit card, please contact us on 1800 884 305.' + | |
'</p>' | |
target.replaceWith(temporaryMessage) | |
}); |
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
// Based on https://stackoverflow.com/a/39900099/2014893 | |
// https://gist.github.com/r-k-b/8ae1a7d47ee41b4c53eec603e4f1e2ac | |
function listFonts () { | |
let fonts = [] | |
for (let node of document.querySelectorAll('*')) { | |
if (!node.style) continue | |
for (let pseudo of ['', ':before', ':after']) { |
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
digraph G { | |
"new user" -> "double opt-in\nrequested"; | |
"double opt-in\nrequested" -> "double opt-in\nconfirmed"; | |
"new user" -> "unsubscribed" [color=grey]; | |
"double opt-in\nrequested" -> "unsubscribed" [color=grey]; | |
"double opt-in\nconfirmed" -> "unsubscribed"; | |
} |
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
// Pick fields from an XML doc to create an object, without having to recreate the whole XML structure in C# | |
var rawXml = "<ms:list xmlns:ms=\\\"http:\\/\\/www.marketingstudio.com\\/API\\/Gateway\\\"><ms:t101><ms:fld_3000>13045525<\\/ms:fld_3000><ms:fld_3001>Booked<\\/ms:fld_3001><ms:fld_3002>S-2308222<\\/ms:fld_3002><ms:fld_3003>[email protected]<\\/ms:fld_3003><ms:fld_3004>2018-03-28T14:18:42<\\/ms:fld_3004><ms:fld_3005><\\/ms:fld_3005><ms:fld_3006>2<\\/ms:fld_3006><ms:fld_3007>ADL<\\/ms:fld_3007><ms:fld_3008>S-2308222<\\/ms:fld_3008><ms:fld_3009>MD<\\/ms:fld_3009><ms:fld_3010>N<\\/ms:fld_3010><ms:fld_3011>2018-08-01T19:30:00<\\/ms:fld_3011><ms:fld_3012>SPIRIT17<\\/ms:fld_3012><ms:fld_3013>SAVER<\\/ms:fld_3013><ms:fld_3014>N<\\/ms:fld_3014><ms:fld_3015>N<\\/ms:fld_3015><ms:fld_3016>N<\\/ms:fld_3016><ms:fld_3017>Y<\\/ms:fld_3017><ms:fld_3018>N<\\/ms:fld_3018><ms:fld_3020>N<\\/ms:fld_3020><ms:fld_3021>N<\\/ms:fld_3021><ms:fld_3022>N<\\/ms:fld_3022><ms:fld_3100><\\/ms:fld_3100><\\/ms:t101><\\/ms:list>"; |
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 itertools | |
somelists = [ | |
[ | |
'There is no last-seen catalog for this product', | |
'The last-seen category is the same as the current category', | |
'The last-seen category is different to the current category', | |
], | |
[ | |
'The last-seen category matches to a BigCommerce category', | |
'The last-seen category does not match to a BigCommerce category', |
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
@-moz-document domain("*.slack.com") { | |
.attachment_group { | |
max-width: 100%; | |
} | |
} |
BC webapp fields are too obtuse ("What does CAT_Custom_48142
represent, again?"), and they're a pain to write out. Grab the select option HTML from the admin UI (under 'Edit Webapp Fields'), and paste the option
s in here.
A Pen by Robert K. Bell on CodePen.
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 ordering = ['fieldID', 'type', 'mandatory', 'dataSourceID', 'useWYSIWYG', 'unknownProperty'] | |
const fieldTypes = { | |
'1': 'Text (string)', | |
'3': 'Boolean', | |
'5': 'List (Dropdown List)', | |
'8': 'Media', | |
'6': 'List (Checkbox List)', | |
'9': 'Text (Multiline)', | |
'11': 'Hyperlink', |