Skip to content

Instantly share code, notes, and snippets.

View deyvisonborges's full-sized avatar

Deyvison Borges deyvisonborges

  • 🇧🇷 Brazil
  • 21:35 (UTC -03:00)
View GitHub Profile
@cferdinandi
cferdinandi / stop-video.js
Last active April 19, 2026 05:35
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@shadybones
shadybones / testDynamicCSSClass.html
Last active January 31, 2022 05:33
Test a snippet of JS for dynamically creating CSS classes using JS
<html>
<head>
<style type="text/css">
.ccc{ background-color: blue; }
</style>
</head>
<body>
<script type="text/javascript">
function createClass(name,rules){
{
"UF": [
{"nome": "Acre", "sigla": "AC"},
{"nome": "Alagoas", "sigla": "AL"},
{"nome": "Amapá", "sigla": "AP"},
{"nome": "Amazonas", "sigla": "AM"},
{"nome": "Bahia", "sigla": "BA"},
{"nome": "Ceará", "sigla": "CE"},
{"nome": "Distrito Federal", "sigla": "DF"},
{"nome": "Espírito Santo", "sigla": "ES"},
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active July 18, 2026 01:34
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@lira
lira / postman-update.sh
Last active March 2, 2025 19:36 — forked from jcharlier/postman-update.sh
Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
@SachaG
SachaG / todo.md
Last active December 26, 2019 16:55
Translations To-Do Items

User Interface

  • Tshirt

Demographics

  • Salary Ranges
  • Years of Experience
  • Company Size
  • Sources
@mrousavy
mrousavy / MEMOIZE.md
Last active April 18, 2026 14:22
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
@ReesMorris
ReesMorris / csp-types.ts
Last active November 10, 2022 02:30
TypeScript Content Security Policy (CSP) Types
type Directive =
| 'child-src'
| 'connect-src'
| 'default-src'
| 'font-src'
| 'frame-src'
| 'img-src'
| 'manifest-src'
| 'media-src'
| 'object-src'
@emrekgn
emrekgn / a-spring-cloud-config-server-application.yml
Last active July 19, 2024 18:32
Spring Cloud Config Server and Client example configuration
# application.yml file of the config server (Spring Cloud Config Server)
server:
port: 9999 # or whatever
spring:
application:
name: config-service
cloud:
config:
server:
git:
@luizomf
luizomf / Dockerfile
Last active June 29, 2026 17:40
Otávio Miranda - Docker SBX https://youtu.be/UJuu_I5ohFY
FROM ubuntu:questing@sha256:4a9232cc47bf99defcc8860ef6222c99773330367fcecbf21ba2edb0b810a31e
# -----------------------------------------------------------------------------
# Copied directly from docker/sandbox-templates:shell-docker
# -----------------------------------------------------------------------------
ARG TARGETPLATFORM
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
ENV PATH=/home/agent/.local/bin:/usr/local/share/npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin