Skip to content

Instantly share code, notes, and snippets.

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

Wallace Batista uselessdev

🏠
Working from home
View GitHub Profile
@sibelius
sibelius / usePageView.tsx
Created April 20, 2020 14:58
usePageView using react-ga
import { usePrevious } from '@app/hooks';
import { useEffect } from 'react';
import ReactGA from 'react-ga';
import { useLocation } from 'react-router-dom';
export const usePageView = () => {
const location = useLocation();
const lastLocation = usePrevious(location);
@sibelius
sibelius / Dockerfile
Created August 6, 2019 19:07
Dockerfile monorepo
### **** This is the Build Image ****
FROM node:10.15.3
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Followed this repo:
# https://github.com/slanatech/vue-monorepo-boilerplate/blob/ef3d5d2bcdf47c553a2713eca222c22ea1bc2901/README.md#docker-build
# to setup Docker + Lerna monorepo approach
@vhaberkorn
vhaberkorn / Instalação_Archlinux.md
Last active February 21, 2021 21:50
Instalação Arch

Instalação do arch linux com full disk encription LVM on LUKS

baseado no script de instalação de @derekstavis 💚

Se algum momento tiver dúvidas sobre o os comando, procurar aqui:(https://wiki.archlinux.org/index.php/installation_guide)

Garantir se fez o boot utilizando EFI

ls /sys/firmware/efi # Deve haver arquivos nesse folder

Checar conexão com a internet.

@poteto
poteto / FBGroupMemberRemover.js
Last active September 11, 2019 17:49
Delete everyone from your Facebook group! Thanks for the dark UX, FB
class FBGroupMemberRemover {
constructor() {
this.adminText = 'Admin';
this.removeMemberModalHeadingText = 'Remove Member';
this.memberElementSelector = '[data-name="GroupProfileGridItem"]';
this.memberContextMenuSelector = 'button[aria-label="Member Settings"]';
this.removeMemberButtonSelector = 'a[data-testid="leave_group"]'
this.removalOptions = {
@fdaciuk
fdaciuk / Create Reducer.md
Created September 17, 2017 00:38
Less boilerplate when create a new reducer on Redux

Create Reducer

Less boilerplate when create a new reducer on Redux

Method:

'use strict'

const createReducer = (initialState, actionHandlers) => {
@flyingluscas
flyingluscas / ShellFunctions.md
Last active November 20, 2019 21:25
Shell functions to run things like NPM, Composer and PHP using Docker.

Shell functions to run things using Docker.

Versions

Control the versions using environment variables, put this in your .bashrc or .zshrc.

PHP_VERSION=7.1
NODE_VERSION=8.0
@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.

import React, { Component } from 'react'
import logo from './logo.svg'
import './App.css'
import { Route, Link, Redirect } from './Zero'
const paths = [ 'one', 'two', 'three' ]
class App extends Component {
render() {
@flyingluscas
flyingluscas / FFMPEGMergAudioVideo.md
Last active February 11, 2017 02:31
FFMPEG Merge audio and video
ffmpeg -i video.mkv -i audio.wav -c:v copy -c:a aac -strict experimental output.mkv
@flyingluscas
flyingluscas / FFMPEGYouTube.md
Last active October 5, 2022 13:11
FFMPEG Optimize videos for YouTube

Command

$ ffmpeg -i <input file> -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart <output_name>.mp4

Function

function youtube () {