```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready
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
#!/usr/bin/env ruby | |
# | |
# Prerequisites: | |
# gem install bundler | |
# bundle install | |
dependencies = `bundle show | grep '*' | awk '{print $2, $3}' | sed -e 's/(//' -e 's/)//'`.split("\n") | |
dependencies.each do |dependency| | |
(gem_name, version) = dependency.split |
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
def get_collections(skuNo): | |
db = Database.Database('rugsystem_new') | |
db.local.execute("SELECT * FROM rugsystem_new.ul_skus US LEFT JOIN rugsystem_new.ul_designs UD ON US.design_id = UD.id LEFT JOIN rugsystem.ul_collections UC ON UD.collection_id = UC.id WHERE US.SkuNo = {}".format(int(skuNo))) | |
collect = {} | |
return collect |
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
#!/usr/bin/env bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Platform |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/usr/bin/env bash | |
# This is a modification from https://gist.github.com/omegahm/28d87a4e1411c030aa89 | |
# Colours and convention picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
## Instructions | |
# Bash 4+ is needed because of associative arrays | |
# jq (https://stedolan.github.io/jq/) | |
# Create access Token from Github (https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and save it under ".token" file | |
# Comment / Uncomment / Add, all the labels you want |
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
username = ARGV[0] | |
pwd = ARGV[1] | |
target_path = ARGV[2] | |
unless ARGV.size == 3 | |
puts "usage: ruby download_rubytapas.rb username password save_path" | |
exit(1) | |
end | |
target_path = File.expand_path(target_path) |
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
#!/bin/bash | |
set -e | |
TIMEOUT_PERIOD=600 | |
EMAIL_ADDRESS="[email protected]" | |
# Updated to make use of timeout and email variables | |
# Also see: http://vitobotta.com/resque-automatically-kill-stuck-workers-retry-failed-jobs/ |