```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 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
#!/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 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
Arcade Fire - Wake Up | |
Modest Mouse - Float On | |
The Shins - New Slang | |
Franz Ferdinand - Take Me Out | |
Pixies - Where Is My Mind? | |
The Strokes - Last Nite | |
LCD Soundsystem - All My Friends | |
Yeah Yeah Yeahs - Maps | |
Arctic Monkeys - Do I Wanna Know? | |
Vampire Weekend - A-Punk |
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
$ GIT_TRACE=1 git commit -a -S -m 'whitespace' | |
10:21:20.904618 git.c:415 trace: built-in: git commit -a -S -m whitespace | |
10:21:20.907237 run-command.c:637 trace: run_command: gpg --status-fd=2 -bsau E288164435BD1457 | |
error: gpg failed to sign the data | |
fatal: failed to write commit object | |
$ gpg --status-fd=2 -bsau E288164435BD1457 | |
[GNUPG:] KEY_CONSIDERED 02FE60A5E2F61054A2159661E288164435BD1457 2 | |
[GNUPG:] BEGIN_SIGNING H8 | |
^C |
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
class User < ApplicationRecord | |
has_many :site_users, dependent: :destroy | |
has_many :sites, through: :site_users | |
def owned_sites | |
sites.where("site_users.roles_mask = ?", SiteUser.mask_for(:owner)) | |
end | |
def owned_sites_using_includes | |
sites.includes(:site_users).where("site_users.roles_mask = ?",SiteUser.mask_for(:owner)) |
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 pytest | |
import json | |
# ---------------------------- # | |
# lib/entities/entity.py | |
# ---------------------------- # | |
class Entity(object): |
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
# . | |
# ├── lib | |
# │ ├── __init__.py | |
# │ ├── entity | |
# │ │ ├── __init__.py | |
# │ │ ├── entity.py | |
# │ │ └── job_post_entity.py | |
# │ └── repository | |
# │ ├── __init__.py | |
# │ ├── job_post_repository.py |
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
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 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
sudo apt-get update | |
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs | |
sudo apt-get install yarn | |
cd | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc |
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
heroku | |
fatal error: unexpected signal during runtime execution | |
[signal 0xb code=0x1 addr=0x3030ba6a7059 pc=0x1a0970] | |
goroutine 1 [running]: | |
runtime.throw(0x4515a0, 0x2a) | |
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:527 +0x90 fp=0xc8200fbbf8 sp=0xc8200fbbe0 | |
runtime.sigpanic() | |
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/sigpanic_unix.go:12 +0x5a fp=0xc8200fbc48 sp=0xc8200fbbf8 | |
sync.(*Pool).Get(0x5b0820, 0x0, 0x0) |
NewerOlder