Skip to content

Instantly share code, notes, and snippets.

View marcio's full-sized avatar
🏠
Working from home

Marcio Gasparotto marcio

🏠
Working from home
  • Ezy Collect
  • Sydney, Australia
View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@Riebart
Riebart / code_flows.md
Last active October 26, 2023 00:03
Thoughts on git branch workflows and microservice code organization

Comparing branching and workflow strategies

Summary of existing

There's several existing strategies for deploying and managing development work and release. They each have their own opinions, but roughly cover a few major situations:

  • Developing a new feature
  • Which branches should be, at all times, deployable, tested code
  • Under what conditions a code review or approval is required to merge code into a new branch
  • How many deployment environments (e.g. production only, or staging and production) you intend to have available, and to whom
@fczbkk
fczbkk / index.js
Created May 23, 2020 05:38
Multiple versions of same library in Webpack
import modernJquery from 'modernJquery'
import legacyJquery from 'legacyJquery'
console.log('Look how much Jquery we can pack into single bundle!')
// 3.x.x
console.log('This is Jquery version:', modernJquery().jquery)
// 2.x.x
console.log('This is Jquery version:', legacyJquery().jquery)
@rsurjano
rsurjano / addons.js
Created December 11, 2019 20:47
Storybook configuration - for stenciljs
import '@storybook/addon-actions/register';
import "@storybook/addon-jest/register";
import '@storybook/addon-viewport/register';
import '@storybook/addon-a11y/register';
import 'storybook-readme/register';
import '@storybook/addon-knobs/register';
import '@storybook/addon-backgrounds/register';
@bvaughn
bvaughn / index.md
Last active January 10, 2024 20:23
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@markotom
markotom / columns-template.js
Last active October 16, 2023 04:25
Create column form layout using react-jsonschema-form and marble-seed
import React, { Component } from 'react'
import api from '~base/api'
import classNames from 'classnames'
import {
BaseForm,
TextWidget,
EmailWidget,
NumberWidget
} from '~base/components/base-form'
@ziluvatar
ziluvatar / token-generator.js
Last active December 9, 2023 21:21
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@mauri870
mauri870 / manjaro-avell-g1513.md
Last active March 2, 2022 02:23
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
@cagartner
cagartner / phpstorm-ajuste.sh
Last active December 23, 2021 02:59
Ajuste para acentos phpstorm
# Adicionar essa linha no arquivo phpstorm.sh da pasta do seu editor
export XMODIFIERS=""
anonymous
anonymous / index.html
Created December 14, 2016 02:05
JS Bin // source https://jsbin.com/hikudu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
</head>
<body>