Skip to content

Instantly share code, notes, and snippets.

View LeoFeitosa's full-sized avatar
💯

LeoFeitosa

💯
  • São Paulo, Brasil
View GitHub Profile
@LeoFeitosa
LeoFeitosa / tutorial.txt
Created April 7, 2022 23:07 — forked from luizomf/tutorial.txt
WSL2 e Docker no Windows 10.
### Tutorial oficial:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
### Passo 1 (PowerShell Admin):
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
### Passo 2 (PowerShell Admin):
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
### Passo 3
@LeoFeitosa
LeoFeitosa / readme.md
Created January 20, 2022 14:24 — forked from vinicius-stutz/readme.md
Padrões de Nomenclatura em C# (pt-br)

Namespace

Por padrão toda biblioteca deve conter um nome padrão em seu namespace. Ex.: MinhaEmpresa.SeuNameSpace (padrão PascalCase).

Classes

As classes devem começar com letra maiúscula e para cada palavra, a primeira letra também deve ser maiúscula (padrão PascalCase).

C#

@LeoFeitosa
LeoFeitosa / PHP Array of Animate.css animation styles
Created September 16, 2021 14:14 — forked from ohid/PHP Array of Animate.css animation styles
An array of all animation style names from animate.css
$animations = array(
'bounce' => 'bounce',
'flash' => 'flash',
'pulse' => 'pulse',
'rubberBand' => 'rubberBand',
'shake' => 'shake',
'swing' => 'swing',
'tada' => 'tada',
'wobble' => 'wobble',
'jello' => 'jello',
<?php
$array = array('um',
'dois',
'tres',
'quatro',
'cinco',
'seis',
'sete',
'oito',
@LeoFeitosa
LeoFeitosa / ucwords.js
Created July 11, 2018 14:58 — forked from ryanhs/ucwords.js
ucwords in JavaScript - Equivalent to PHP's ucwords() Returns a string with the first letter in upper case of each word.
String.prototype.ucwords = function() {
str = this.toLowerCase();
return str.replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g,
function(s){
return s.toUpperCase();
});
};
@LeoFeitosa
LeoFeitosa / ucwords.js
Created July 11, 2018 14:58 — forked from ryanhs/ucwords.js
ucwords in JavaScript - Equivalent to PHP's ucwords() Returns a string with the first letter in upper case of each word.
String.prototype.ucwords = function() {
str = this.toLowerCase();
return str.replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g,
function(s){
return s.toUpperCase();
});
};
@LeoFeitosa
LeoFeitosa / gist:9a398ff4d40d74b77e1e4c418684b4db
Created December 13, 2017 19:13 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array