Skip to content

Instantly share code, notes, and snippets.

View fdaciuk's full-sized avatar
🔥

Fernando Daciuk fdaciuk

🔥
View GitHub Profile
@fdaciuk
fdaciuk / clear-metro-lyrics.js
Last active June 3, 2017 17:21
Clear Metro Lyrics interface
// Just run it on console, inside metrolyrics.com page
function $ (element) {
return document.querySelector(element)
}
function $$ (element) {
return document.querySelectorAll(element)
}
@fdaciuk
fdaciuk / Remove unused git branches.md
Last active November 15, 2020 14:42
Remove unused git branches

Remove unused git branchs

Update 'main|dev' with branches you want to mantain. All others will be removed.

@fdaciuk
fdaciuk / lazy-img.jsx
Last active December 8, 2022 18:38
React Lazy img load component
'use strict'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
class LazyImg extends Component {
constructor () {
super()
this.state = { loaded: false }
this.img = {}
@fdaciuk
fdaciuk / extract-all-text-plugin.js
Created March 20, 2017 17:58
Webpack extract text even when use dynamic import()
'use strict'
class ExtractText {
constructor (options) {
this.options = options
this.filterFunction = this.getFilterFunction(options)
this.emit = this.emit.bind(this)
}
getFilterFunction (options) {
'use strict'
import React, { Component } from 'react'
class MapComponent extends Component {
componentDidMount () {
window.initMap = () => {
const map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@fdaciuk
fdaciuk / functions.php
Last active April 12, 2016 20:30
Adicionar mais campos no perfil de usuário do WordPress
<?php
add_filter( 'user_contactmethods', 'add_new_user_fields' );
function add_new_user_fields( $user_contact ) {
$user_contact[ 'billing_cel_phone' ] = 'Celular';
return $user_contact;
}

Hexo with Google search bar

@fdaciuk
fdaciuk / gifjs.asm
Last active January 30, 2020 11:28 — forked from ajinabraham/gifjs.asm
; a hand-made GIF containing valid JavaScript code
; abusing header to start a JavaScript comment
; inspired by Saumil Shah's Deadly Pixels presentation
; Ange Albertini, BSD Licence 2013
; yamal gifjs.asm -o img.gif
WIDTH equ 10799 ; equivalent to 2f2a, which is '/*' in ASCII, thus starting an opening comment
@fdaciuk
fdaciuk / 01 - Sublime Configurations.md
Last active March 11, 2021 00:56
Sublime Configurations