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
@willianbs
willianbs / CoinMarketCap-script.gs
Created February 16, 2023 13:17
Pega dados das Cryptos direto da API do CoinMarketCap
function coin_price() {
const myGoogleSheetName =
// Change "Sheet1" to the name of your sheet where you want to run this.
SpreadsheetApp.getActiveSpreadsheet().getSheetByName('COINMARKETCAP')
// Get preferred currency, defaults to BRL
const defaultCurrency = 'BRL'
const preferedCurrency = myGoogleSheetName.getRange(2, 6).getValue() || defaultCurrency
@willianbs
willianbs / coin_price.gs
Created January 13, 2022 15:06
Get CoinMarketCap Data fro Google Sheets
function coin_price() {
const myGoogleSheetName =
// Change "Sheet1" to the name of your sheet where you want to run this.
SpreadsheetApp.getActiveSpreadsheet().getSheetByName('COINMARKETCAP')
// Get preferred currency, defaults to BRL
const defaultCurrency = 'BRL'
// Data should be in the sheet at B6
const preferedCurrency = myGoogleSheetName.getRange(2, 6).getValue() || defaultCurrency
{% 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 / possibleCombinations.js
Created November 14, 2019 16:52
return the number of possible ranges from 1 to N
"use strict";
//recursive
const possibleCombinations = n => {
if (n == 0) {
return 0;
} else {
return n + possibleCombinations(n - 1);
}