Skip to content

Instantly share code, notes, and snippets.

View dandemeyere's full-sized avatar

Dan DeMeyere dandemeyere

View GitHub Profile
def super_hyun_check
return if @concierge_bag.user.orders.paid.items_orders.exists?
return if @concierge_bag.partner?
return if BagInsert.count > 10000 # BagInsert is the new modal
# Seed this PartnerCampaign across all envs through migration?
@concierge_bag.update_attributes(partner_campaign: PartnerCampaign.find(20721))
@concierge_bag.bag_inserts.create(name: "", user_id: , partner_campaign_id: )
end
def super_hyun_check
return if @concierge_bag.user.orders.paid.items_orders.exists?
return if @concierge_bag.partner?
return if BagInsert.count > 10000 # BagInsert is the new modal
# Seed this PartnerCampaign across all envs through migration?
@concierge_bag.update_attributes(partner_campaign: PartnerCampaign.find(20721))
@concierge_bag.bag_inserts.create(name: "", user_id: , partner_campaign_id: )
end
## API Interface
campaign_promo = CurrentUserPromotion.new(user)
campaign_promo.populate!
class CurrentUserPromotion
attr_accessor :user, :user_segments, :user_group, :promotion, :coupon
def initialize(user)
@user = user
#shop_results {
@include respond(ipad-pro-portrait) {
.columns {
width: 24.35345%;
margin-left: 0.6%;
}
.columns:nth-of-type(4n+5) {
margin-left: 0%;
clear: both;
}
$ipad-pro-portrait-breakpoint: "(min-device-width : 1024px) and (max-device-width : 1024px) and (min-device-height : 1366px) and (max-device-height : 1366px) and (min-width: 1024px) and (max-width: 1024px)";
$ipad-pro-landscape-breakpoint: "(min-device-width : 1024px) and (max-device-width : 1024px) and (min-device-height : 1366px) and (max-device-height : 1366px) and (min-width: 1366px) and (max-width: 1366px)";
// Responsive Mixins
@mixin respond($media) {
if $media == desktop {
@media only screen and (min-width: $medium-tablet-device-width + 1) and #{$desktop-only-breakpoint} { @content; }
}
@else if $media == ipad-pro-portrait {
@media only screen and #{$ipad-pro-portrait-breakpoint} { @content; }
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://www.thredup.com/shop/products",
"name": "Shop"
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": {{item_details}},
"image": {{item_image_path}},
"description": {{item_meta_description}},
"mpn": {{item_id}},
"brand": {
"@type": "Thing",
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": {{item_details}},
"image": {{item_image_path}},
"description": {{item_meta_description}},
"mpn": {{item_id}},
"brand": {
"@type": "Thing",
_colorChip() {
var hexValue = this.props.componentData.hex;
if (!hexValue) {
return <img src={this.props.componentData.image_url} />;
}
var colorClassName = "color-chip";
if (hexValue === "#FFFFF0" || hexValue === "#FFFFFF") {
colorClassName += " light-border";
}
# Yay! High voltage and arrows!
prompt_setup_pygmalion(){
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[blue]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✭%{$reset_color%}"
base_prompt='%{$reset_color%}%{$fg[cyan]%}%m%{$reset_color%}%{$fg[violet]%}:%{$reset_color%}%{$fg[yellow]%}%0~%{$reset_color%}%{$reset_color%}%{$fg[cyan]%} git%{$reset_color%}%{$fg[violet]%}:%{$reset_color%}'
post_prompt='%{$fg[magenta]%}❯%{$reset_color%}%{$fg[cyan]%}❯%{$reset_color%}%{$fg[blue]%}❯%{$reset_color%} '