Skip to content

Instantly share code, notes, and snippets.

View manobi's full-sized avatar

Gabriel de Oliveira Barbosa manobi

View GitHub Profile
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active May 3, 2025 10:03
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

@ahmetb
ahmetb / gcrgc.sh
Last active March 10, 2025 21:51
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@JesterXL
JesterXL / promiseall.js
Last active October 31, 2022 16:02
Example of using Array Destructuring for Promise.all.
Promise.all([
someThingThatReturnsAPromise(),
otherThingThatReturnsAPromise(),
lastThingThatReturnsAPromise()
])
.then( results =>
{
// this...
const [first, second, third] = results;
// ... instead of
@elenakondrateva
elenakondrateva / package.json
Last active August 6, 2019 20:00
Magento 2 Post CSS Autoprefixer
{
"name": "Project",
"author": "Vendor",
"description": "Node modules dependencies for local development",
"version": "2.0.0",
"license": "(OSL-3.0 OR AFL-3.0)",
"repository": {
"type": "git",
"url": "https://github.com/magento/magento2.git"
},
#!/bin/bash
regions=(local ca-central-1 eu-central-1 ap-southeast-1 ap-northeast-1 us-east-1)
image_name_base="cache-bench"
image_sizes_in_mb=(64 512 1024)
dockerfile="Dockerfile.sample"
log_file=docker-bench.log
@yvoronoy
yvoronoy / Magento2-rest-curl-examples
Created May 11, 2017 16:13
Magento2 API Examples
#!/bin/bash
# CREATE CATEGORY REST API
TOKEN=
BASE_URL=$1
echo $BASE_URL
TOKEN=$(curl -X POST "${BASE_URL}index.php/rest/V1/integration/admin/token" \
-H "Content-Type:application/json" \
@gomar
gomar / 00-intro.md
Last active January 30, 2024 04:58
Setting up a Keynote document for grid layout design

Setting up a Keynote document for grid layout design

I like (love ?) Keynote because it

  • is a simple to use presentation software,
  • is vector based (when zooming it just looks gorgeous)
  • exports to powerpoint

If I could remove that last argument, I would, but the fact is that, as a consultant, the final document is almost always expected to be a powerpoint document. Don't ask me why, it is just so. I am fighting against it but I did not win the battle so far ...

Prep Work (Google Cloud)

Visit https://console.cloud.google.com and a create project with the name of kubernetes-cluster and take note of the project id.

Or use gcloud alpha projects create kubernetes-cluster-1345 if you have access.

Update gcloud.

gcloud components install kubectl
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active March 7, 2025 05:00
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :