Skip to content

Instantly share code, notes, and snippets.

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

Wallace Batista hiwllc

🏠
Working from home
View GitHub Profile
@flyingluscas
flyingluscas / SettingUpDocker.md
Last active August 1, 2022 23:22
Setting Up Docker

Setting Up Docker

1. Installing Docker

$ curl -sSL https://get.docker.com/ | sh
$ sudo usermod -aG docker $USER
@flyingluscas
flyingluscas / RandomCrap.md
Last active October 3, 2016 14:28
Códigos Marotos da Vida (não é meu, só achei jogado nuns projeto por ae, é importante para mim que você saiba disso)

Compilado de Bosta

	if($id_insert)
        {
			$return['status']   = 'okay';
			$return['redirect'] = base_url('admin/' . $this->module['name'] . '/newsletter');

			$this->template_lib->set_message('Registro criado com sucesso', 'success');
@flyingluscas
flyingluscas / UsingFakerInPT-BR.md
Last active July 27, 2024 13:13
Utilizando Faker em pt-BR

Utilizando Faker em pt-BR

Acesse o seu arquivo app/Providers/AppServiceProvider.php, e no método register adicione o seguinte :

/**
 * Register any application services.
 *
 * @return void
 */
@flyingluscas
flyingluscas / MyUbuntuThemeConfigurations.md
Last active February 26, 2019 13:19
My Ubuntu Theme Configurations

My Ubuntu Theme Settings

Install Theme

$ sudo add-apt-repository ppa:noobslab/themes
$ sudo apt-get update
$ sudo apt-get install flatabulous-theme

Install Icons Pack

@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 () {
@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
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() {
@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.

@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 / 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) =&gt; {