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
const quantityInput = document.getElementsByClassName('product-quantity-input')[0]; | |
const unitPriceElement = document.getElementsByClassName('unit-price item')[0].getElementsByClassName('value')[0]; | |
const totalPriceElement = document.getElementsByClassName('subtotal item')[0].getElementsByClassName('value')[0]; | |
const setQty = val => { | |
const e = document.createEvent('HTMLEvents'); | |
e.initEvent('change', false, false); | |
quantityInput.dispatchEvent(e); | |
quantityInput.value = val; | |
} | |
const currUnitPrice = () => Number(unitPriceElement.textContent.replace("$", "")) || 0; |
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
""" | |
Forked and heavily adappted from: | |
https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e | |
Copies all keys from the source Redis host to the destination Redis host. | |
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
restricted (e.g. on Amazon ElastiCache). | |
The script scans through the keyspace of the given database number and uses | |
a pipeline of DUMP and RESTORE commands to migrate the keys. |
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
+----------------------+--------+--------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+--------+--------+---------+---------+-----+-------+ | |
| Controllers | 2519 | 2192 | 42 | 188 | 4 | 9 | | |
| Jobs | 352 | 312 | 21 | 24 | 1 | 11 | | |
| Models | 18207 | 13750 | 181 | 1023 | 5 | 11 | | |
| Mailers | 500 | 447 | 14 | 31 | 2 | 12 | | |
| Channels | 33 | 33 | 7 | 5 | 0 | 4 | | |
| Libraries | 1847 | 1696 | 6 | 8 | 1 | 210 | | |
| Mailer specs | 51 | 36 | 4 | 0 | 0 | 0 | |
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
[~/boost/boost-client]$ cloc --exclude-dir=node_modules . [master][ruby-2.6.2] | |
1428 text files. | |
1422 unique files. | |
28 files ignored. | |
github.com/AlDanial/cloc v 1.80 T=6.31 s (222.7 files/s, 132139.1 lines/s) | |
------------------------------------------------------------------------------- | |
Language files blank comment code | |
------------------------------------------------------------------------------- | |
JavaScript 783 122609 54817 615652 |
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
{"page"=>{"body"=>{"type"=>"mailup-bee-page-properties", "content"=>{"style"=>{"color"=>"#000000", "font-family"=>"'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif"}, "computedStyle"=>{"linkColor"=>"#00AEAF", "messageWidth"=>"580px", "messageBackgroundColor"=>"transparent"}}, "webFonts"=>[], "container"=>{"style"=>{"background-color"=>"#FFFFFF"}}}, "rows"=>[{"type"=>"one-column-empty", "locked"=>false, "columns"=>[{"style"=>{"border-top"=>"0px solid transparent", "border-left"=>"0px solid transparent", "padding-top"=>"0px", "border-right"=>"0px solid transparent", "padding-left"=>"0px", "border-bottom"=>"0px solid transparent", "padding-right"=>"0px", "padding-bottom"=>"0px", "background-color"=>"transparent"}, "modules"=>[{"type"=>"mailup-bee-newsletter-modules-divider", "locked"=>false, "descriptor"=>{"style"=>{"padding-top"=>"10px", "padding-left"=>"0px", "padding-right"=>"0px", "padding-bottom"=>"10px"}, "divider"=>{"style"=>{"width"=>"100%", "height" |
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 PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\"><head>\n <!--[if gte mso 9]><xml>\n <o:OfficeDocumentSettings>\n <o:AllowPNG/>\n <o:PixelsPerInch>96</o:PixelsPerInch>\n </o:OfficeDocumentSettings>\n </xml><![endif]-->\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <!--[if !mso]><!--><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /><!--<![endif]-->\n <title>BF-simple-template</title>\n \n \n <style type=\"text/css\" id=\"media-query\">\n body {\n margin: 0;\n padding: 0; }\n\ntable, tr, td {\n vertical-align: top;\n border-collapse: collapse; }\n\n.ie-browser table, .mso-container table {\n table-layout: fixed; }\n\n* {\n line-height: inherit |
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
class PracticePantherIntegrationService < IntegrationService | |
def oauth_klass | |
PracticePantherOauthService | |
end | |
def deauthorize! | |
@integration.destroy! | |
end | |
end |
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
class ClioIntegrationService < IntegrationService | |
def oauth_klass | |
ClioOauthService | |
end | |
end |
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
class IntegrationService | |
def initialize(integration) | |
@integration = integration | |
end | |
def token_expired? | |
Time.current > @integration.expires_at | |
end | |
def refresh_token! |
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
/* | |
// Example implementation as follows: | |
public class AWSS3_GetService extends AWS { | |
public override void init() { | |
endpoint = new Url('https://s3.amazonaws.com/'); | |
resource = '/'; | |
region = 'us-east-1'; | |
service = 's3'; | |
accessKey = 'my-key-here'; | |
method = HttpMethod.XGET; |