```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/perl | |
# displays the 256 colors specified in tmux's "colourNN" way. | |
# June, 1st 2011 by Yasunori Taniike (@ytaniike). | |
use strict; | |
use warnings; | |
my $prefix_bl = "\x1b[38;5;0;48;5;"; | |
my $prefix_wl = "\x1b[38;5;15;48;5;"; | |
my $suffix = "\x1b[0m"; |
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
$ 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 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
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2 |
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
# . | |
# ├── lib | |
# │ ├── __init__.py | |
# │ ├── entity | |
# │ │ ├── __init__.py | |
# │ │ ├── entity.py | |
# │ │ └── job_post_entity.py | |
# │ └── repository | |
# │ ├── __init__.py | |
# │ ├── job_post_repository.py |
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
import pytest | |
import json | |
# ---------------------------- # | |
# lib/entities/entity.py | |
# ---------------------------- # | |
class Entity(object): |
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
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 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 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
for url in $(cat ~/urls.txt); do curl --write-out "$url | %{http_code} | %{time_total}\n" --silent -o /dev/null $url; done| sed 's/\(^.*\)\|/<li>\1/g' | sed 's/$/<\/li>/g' |
NewerOlder