Skip to content

Instantly share code, notes, and snippets.

View bryanleetc's full-sized avatar

Bryan Lee bryanleetc

View GitHub Profile
@bryanleetc
bryanleetc / circleci-config-test-only.yml
Last active January 9, 2019 17:43
Medium - Laravel CircleCI Deployer
version: 2
jobs:
build:
docker:
# Specify the version you desire here
- image: circleci/php:7.1-browsers
- image: circleci/mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_USER: root
@bryanleetc
bryanleetc / 2nd version to grab product details (bryan)
Last active January 25, 2019 10:11 — forked from axflo/product_details_for_widget
Snippet to be pasted in console in product details page to get data for the product widget
// Bryan's version
let product = window.App.payload.product || {};
function getDetails() {
const transformedPrice = product.price_range.max === product.price_range.min ? `$${product.price_range.min}` : `$${product.price_range.min} - $${product.price_range.max}`;
return {
title: product.title,
supply_id: product.id,
@bryanleetc
bryanleetc / app.rake
Created November 15, 2017 03:52
A rake task to type less when deploying a Rails app via Capistrano
namespace :app do
task :deploy, [:id] => :environment do |t, args|
system("bundle exec cap production deploy")
end
end
@bryanleetc
bryanleetc / nginx.conf
Last active August 29, 2015 14:16 — forked from Stanback/nginx.conf
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers