Skip to content

Instantly share code, notes, and snippets.

View GlauberF's full-sized avatar
🎯
Foco e determinação nos objetivos.

Glauber Funez GlauberF

🎯
Foco e determinação nos objetivos.
View GitHub Profile
1) Se tiver o Docker instalado, remova!
2) Habilite o WSL no Windows 10
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
3) Habilitar o WSL para a versão 2
wsl --set-default-version 2
4) Instalar o Ubuntu na Microsoft Store
<?php
/**
* The table Printer class has no dependencies and generates an array of strings
* out of an array of objects or arrays and the child properties that should be printed given by an array of strings
*
* Should result in something like the following:
* +------+---------------+----------------+---------------+
* | id | name | col_name_three | col_name_four |
* +------+---------------+----------------+---------------+
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@PARC6502
PARC6502 / OpenSourceBaas.md
Last active April 23, 2024 09:44
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@redestructa
redestructa / TablePrinter.php
Created February 13, 2019 10:42
The table Printer class has no dependencies and generates an array out of an object array
<?php
/**
* The table Printer class has no dependencies and generates an array (strings)
* out of an object array / countable and the child properties that should be printed given by an array (strings)
*/
class TablePrinter
{
/**
* @param \Countable|array|object[] $historyItems
@crissilvaeng
crissilvaeng / README.md
Created May 9, 2016 19:40
Padrão e mensagens de commit.

Styleguides

Mensagens de commit styleguide

  • Usar modo imperativo ("Adiciona feature" não "Adicionando feature" ou "Adicionada feature")
  • Primeira linha deve ter no máximo 72 caracteres
  • Considere descrever com detalhes no corpo do commit
  • Considere usar um emoji no início da mensagem de commit

Emoji | Code | Commit Type

@liruqi
liruqi / facebook_email.js
Last active December 26, 2019 10:04
Get facebook fans email
var run = 0;
var mails = {}
total = 3000; //滚动次数,可以自己根据情况定义
function getEmails (cont) {
var friendbutton=cont.getElementsByClassName("_ohe");
for(var i=0; i<friendbutton.length; i++) {
var link = friendbutton[i].getAttribute("href");
if(link && link.substr(0,25)=="https://www.facebook.com/") {
@pbojinov
pbojinov / README.md
Last active December 8, 2023 21:09
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@cowboy
cowboy / stringify.js
Created September 19, 2012 13:45
JavaScript: like JSON.stringify but handles functions, good for creating arbitrary .js objects?
var stringify = function(obj, prop) {
var placeholder = '____PLACEHOLDER____';
var fns = [];
var json = JSON.stringify(obj, function(key, value) {
if (typeof value === 'function') {
fns.push(value);
return placeholder;
}
return value;
}, 2);
@reusee
reusee / py2php.py
Created June 20, 2011 16:49
Python to php translator, compile python script to php
import ast
from cStringIO import StringIO
import sys
INFSTR = '1e308'
def interleave(inter, f, seq):
seq = iter(seq)
try:
f(next(seq))