Marketing Support Solutions (MSS) / SPExpress (SPE) / Stitch Labs / Shopify Bridge
- Gain access to the FTP Server
- Parse dates out of files
- Have awareness of processed documents (Mongo?)
- Output dates into file names
| const fs = require('fs'); | |
| const file = fs.readFileSync('contacts.rtf', 'utf8'); | |
| const matches = file.match(/\n[a-z ]+.* 0 Y(?:\n.+)+/gi); | |
| const contacts = matches.map(match => { | |
| const lines = match.split("\n"); | |
| const contact = Object.create({}); |
| # https://docs.shopify.com/api/introduction/api-call-limit | |
| module ActiveResource | |
| # 429 Client Error | |
| class RateLimitExceededError < ClientError # :nodoc: | |
| end | |
| class Connection | |
| RATE_LIMIT_SLEEP_SECONDS = 20 # number of seconds to sleep (by sleeping 20 you reset the clock to get 40 fresh burst calls with the default 2 calls/sec) |
Marketing Support Solutions (MSS) / SPExpress (SPE) / Stitch Labs / Shopify Bridge
| // parsing http request authorization body | |
| https://regex101.com/r/bO7vG8/5 | |
| let pat = /([^=,\s]*)\s*=\s*["'\s]?([^,"]+)["'\s]?/gi; | |
| let WWW-Authenticate =`Digest username="sdfa", realm="dggrs", nonce="0.9645404655020684 ", `+ | |
| `uri="/", response="27d9d30c793867d9db15cc69145a72bd", opaque="undefined", qop=auth, `+ | |
| `nc=00000001, cnonce="fa56655dc694e1a0"` |
| ; Based on Ideas from a post on the League of Legends subreddit | |
| ; http://www.reddit.com/r/leagueoflegends/comments/1bo2nk/guide_to_easy_kiting_left_click_attack/ | |
| [HUDEvents] | |
| evtHoldShowScoreBoard=[`] | |
| ; camera | |
| evtSelectAlly4=[Shift][z] | |
| evtSelectAlly2=[Shift][x] |
| def donees_in_radius_with_timeslots(radius) | |
| required_bits = 2**User.valid_roles.index(:donee) | |
| Location.near(self.location, | |
| radius, | |
| :select => "locations.*, users.*, time_slots.*" | |
| ).joins(:user => :time_slots) | |
| .where(["roles_mask & ? > 0", required_bits]) | |
| .where(["roles_mask & ? > 0", required_bits]) | |
| end |