Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile
@5t3ph
5t3ph / element-classes-and-ids-vanilla.css
Last active January 25, 2022 04:06
Tag HTML elements with their class names and IDs to visualize page structure
*[class],
*[id] {
position: relative;
outline: 2px dashed red;
}
*[class]::before, *[class]::after,
*[id]::before,
*[id]::after {
position: absolute;
@ianliu
ianliu / codigos.csv
Last active March 12, 2024 23:28
Script to fetch some Brazilian stock metadata
codigo codcvm cnpj site instituicao
PATI3 94 92.693.019/0001-89 www.panatlantica.com.br ITAU CORRETORA ACOES
PATI4 94 92.693.019/0001-89 www.panatlantica.com.br ITAU CORRETORA ACOES
BAHI3 701 45.987.245/0001-92 www.bahema.com.br ITAUBANCO - ACOES
BBDC3 906 60.746.948/0001-12 www.bradesco.com.br BRADESCO
BBDC4 906 60.746.948/0001-12 www.bradesco.com.br BRADESCO
BAZA3 922 04.902.979/0001-44 www.bancoamazonia.com.br BRADESCO
BBAS11 1023 00.000.000/0001-91 www.bb.com.br BRASIL
BBAS12 1023 00.000.000/0001-91 www.bb.com.br BRASIL
BBAS3 1023 00.000.000/0001-91 www.bb.com.br BRASIL
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@erkobridee
erkobridee / git_repo_backup.sh
Last active July 4, 2023 07:38
useful way to backup a whole repository from on remote to another remote server on an Unix base system
# define a full backup of a git repository from one remote server to another one
origin="https://remote-source/repository.git";
target="https://remote-target/repository.git";
workDir="temp-directory";
mkdir $workDir

Okay, this is where I leave you.

Improvements

Infinite Scroll

We have a few issues with our current Infinite Scroll:

  1. It will attach infinite elements into the DOM as is being scrolled;
  2. The code for handling it is being copy/pasted in different files to do the same thing;
  3. Some files has extra handling for no apparent reason;
@mikowl
mikowl / oneliners.js
Last active March 28, 2024 20:52
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@francisrstokes
francisrstokes / StateDispatcher.js
Last active May 28, 2019 02:31
Redux without redux - sharing state and one way data flow using only standard react
import React from 'react';
export class StateDispatcher extends React.Component {
constructor(props) {
super(props);
this.state = props.state || {};
this._dispatch = this.dispatch.bind(this);
}
dispatch(action) {
@merlosy
merlosy / merge-cobertura.js
Last active February 21, 2023 12:22
Merge multiple cobertura report in XML (node script)
/**
* This is a node script to merge cobertura reports in XML format.
* It requires `xml2js` : `npm i -D xml2js`
*
* Execute with:
* ```
* node merge-cobertura.js coverage/file1.xml coverage/file2.xml to=coverage-final.xml
* ```
* @see https://github.com/Leonidas-from-XIV/node-xml2js
* @author Jérémy Legros
@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@deepakpk009
deepakpk009 / media.json
Created November 8, 2017 14:02
sample free video urls
{
"categories": [
{
"name": "Movies",
"videos": [
{
"description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],