Skip to content

Instantly share code, notes, and snippets.

View yuigoto's full-sized avatar
😓
pretty much exhausted, missing some sleep

Fabio Goto yuigoto

😓
pretty much exhausted, missing some sleep
View GitHub Profile
@yifeiyin
yifeiyin / graph.txt
Created July 9, 2020 02:33
Generate React Components Dependency Graph
https://www.netlify.com/blog/2018/08/23/how-to-easily-visualize-a-projects-dependency-graph-with-dependency-cruiser/
npm i -g dependency-cruiser
brew install graphviz
depcruise --exclude "^node_modules" --output-type dot src | dot -T svg > dependencygraph.svg
@kodybrown
kodybrown / example_usage.txt
Created July 31, 2019 23:48
batch file boilerplate template
>template.bat /?
test v1.23
This is a sample batch file template,
providing command-line arguments and flags.
USAGE:
test.bat [flags] "required argument" "optional argument"
/?, --help shows this help
/v, --version shows the version
<?php
/**
* User: Matheus Gomes
* E-maiL: matheus@lenzy.com.br
* Date: 07/03/19
* Time: 15:32
*/
class CreditCard
{
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@recca0120
recca0120 / Facebook.js
Created June 22, 2017 05:10
Facebook Promise Wrapper
'use strict';
export class Facebook {
getScript() {
return new Promise((resolve) => {
if (window.FB) {
resolve(window.FB);
}
const id = 'facebook-jssdk';
@simondahla
simondahla / with-analytics.js.html
Last active November 29, 2019 11:24
Updated Instructions for Implementing Google Optimize. Where `GTM-XXXXXX` is the Optimize Container ID & where `GTM-YYYYYY` is the Google Tag Manager Container ID and where `UA-ZZZZZZZZ-Z` is the Google Analytics Property ID. Based on the latest documentation at https://support.google.com/360suite/optimize/answer/7359264
<!DOCTYPE html>
<html>
<head>
<!-- 0. UTF-8 encoding -->
<meta charset="utf-8">
<!-- 1. (OPTIONAL) Move jQuery here. -->
<!-- 2. (OPTIONAL) Datalayer -->
@0xjac
0xjac / private_fork.md
Last active July 6, 2024 04:53
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@sam-artuso
sam-artuso / setting-up-babel-nodemon.md
Last active November 3, 2023 08:52
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@Rich-Harris
Rich-Harris / service-workers.md
Last active July 1, 2024 06:33
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 5, 2024 10:46
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?