Skip to content

Instantly share code, notes, and snippets.

View willianbs's full-sized avatar
:shipit:
Working from home

Will Silveira willianbs

:shipit:
Working from home
View GitHub Profile
{% comment %}
Use this snippet to add a responsive image to page.
Requires lazysizes.js
Specify Shopify image you want to make responsive in the "with" parameter (see examples below).
You can use following variables to customize the image
* type: specifies the type of image file being accessed (ie an image from content, a product image, or a theme asset image).
* default_size: size of placeholder image until full image is loaded (default: '150x')
@willianbs
willianbs / review-checklist.md
Created December 8, 2020 13:27 — forked from bigsergey/review-checklist.md
Front-end Code Review Checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@willianbs
willianbs / bzexcluderules_editable.xml
Created October 22, 2020 18:53 — forked from jsonmaur/bzexcluderules_editable.xml
Backblaze Custom Exclude
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@willianbs
willianbs / mac-setup-redis.md
Created June 1, 2020 19:37 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@willianbs
willianbs / 1_shopify_system_translations.md
Created February 27, 2020 18:05 — forked from ridem/1_shopify_system_translations.md
Shopify Checkout & system translations - Chinese

How to get Shopify system's translation keys

Go to https://{{your_shopify_domain}}/admin/themes/{{your_theme_code}}/language?category=checkout+%26+system

To get Shopify's system translation keys

Open your browser console and paste this code:

var obj = {};
$(".translation__target").each(function() {
  var value = this.children[0].value ? this.children[0].value : this.children[0].placeholder
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-no-unsupported-browser-features",
"stylelint-order"
],
"ignoreFiles": ["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.html"],
"rules": {
"declaration-block-no-redundant-longhand-properties": [
true,
@willianbs
willianbs / .eslintrc.js
Created February 3, 2020 13:14 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@willianbs
willianbs / media-query.css
Last active September 20, 2019 14:12 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@willianbs
willianbs / install-redis.sh
Created August 9, 2016 19:25 — forked from four43/install-redis.sh
Install Redis
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@willianbs
willianbs / replace-apache.sh
Last active August 2, 2016 16:54 — forked from nzakas/replace-apache.sh
Replace Apache with nginx on Elastic Beanstalk AMI (PHP 64bit)
#!/bin/sh
# IMPORTANT: Run this script as sudo or else it won't work
# Original script: http://my.safaribooksonline.com/book/programming/java/9781449309558/hacking-elastic-beanstalk/hackingelectric#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODE0NDkzMDk1NTgvSV9zZWN0MTRfZDFlMjAyNQ==
echo 'Installing nginx...sit tight'
yum -y install nginx
echo 'Fixing nginx configuration'
sed -i 's/ 1;/ 4;/g' /etc/nginx/nginx.conf
rm /etc/nginx/conf.d/default.conf