Skip to content

Instantly share code, notes, and snippets.

Async Model
Contact
phone call -> Sandy
Automation
Sandy
intent detected -> Ticket
intent failure -> Agent
booking mismatch -> Exit
Ticket
Agent
@annez
annez / SketchSystems.spec
Last active June 20, 2023 12:21
Async Model
Async Model
Contact
phone call -> Sandy
Automation
Sandy
intent detected -> Ticket
intent failure -> Agent
booking mismatch -> Exit
Ticket
Agent
@annez
annez / SketchSystems.spec
Last active June 20, 2023 12:21
Async Model
Async Model
Contact
phone call -> Sandy
Automation
Sandy
intent detected -> Ticket
intent failure -> Agent
booking mismatch -> Exit
Ticket
Agent
#visContainer {
left: 5px !important;
right: 5px !important;
}
#tooltip {
position: absolute;
width: auto;
height: auto;
padding: 5px;
@annez
annez / gist:ceb9c1b8ab13e10c0180d70a6a99103f
Created November 3, 2021 17:04
engineering-principles
https://medium.com/transferwise-engineering/our-engineering-values-at-transferwise-55c0003e19a1
https://product.hubspot.com/blog/hubspots-engineering-values
https://blog.coinbase.com/what-are-coinbases-engineering-principles-c798da7330c
@annez
annez / fastly.vcl
Created March 25, 2019 08:54
Fastly Brotli
# We explicitly ignore "application/json" due to some clients (Ruby, Node) not supporting BR so if you fetch internally from Fastly you'll get uncompressed content
sub vcl_recv {
if (req.http.Fastly-Orig-Accept-Encoding) {
if (req.http.Fastly-Orig-Accept-Encoding ~ "br" && req.http.Content-type !~ "application/json") {
set req.http.Accept-Encoding = "br";
} elsif (req.http.Fastly-Orig-Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} else {
unset req.http.Accept-Encoding;
}
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inher
@annez
annez / capistranosucks.rb
Created December 10, 2015 12:08
Fix to override rake being execute out of binstub context
new_hash = {
:rake => "bundle exec bin/rake"
}
namespace :bundler do
task :map_bins do
fetch(:bundle_bins).each do |command|
SSHKit.config.command_map = SSHKit.config.command_map.defaults.merge!(new_hash)
end
end
@annez
annez / gist:cfc227928eba4e51f0f3
Last active August 29, 2015 14:23
HIDPI compass image mixin
/// Returns a normal or 2x image depending on the DPI of the screen.
///
/// @author David Annez
///
/// @param {String} $image-path
/// The path to the image
///
/// @param {String} $format [".png"]
/// The format of the file
@annez
annez / nginx-pagespeed-conf
Created March 20, 2015 09:29
Nginx pagespeed configuration
pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed EnableFilters combine_css,extend_cache,rewrite_images,lazyload_images,collapse_whitespace,inline_javascript,inline_css,local_storage_cache,prioritize_critical_css;
pagespeed EnableFilters rewrite_css,rewrite_javascript;
# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";