Skip to content

Instantly share code, notes, and snippets.

Avatar

Micael Mota micaelomota

View GitHub Profile
@iheartmedia-matt
iheartmedia-matt / .htaccess
Created Aug 15, 2018
Apache .htaccess SSL React Router
View .htaccess
<ifModule mod_rewrite.c>
#######################################################################
# GENERAL #
#######################################################################
# Make apache follow sym links to files
Options +FollowSymLinks
# If somebody opens a folder, hide all files from the resulting folder list
@prasofty
prasofty / margin_padding_helper.css
Last active Aug 25, 2021
Margin Padding Helper CSS
View margin_padding_helper.css
.p-0 {
padding: 0px;
}
.p-3 {
padding: 3px;
}
.p-5 {
padding: 5px;
@alfredbaudisch
alfredbaudisch / BrPhoneNumberFormatter.java
Created Sep 23, 2015
Android EditText mask for Brazilian telephone numbers. It deals with the default format (xx) xxxx-xxxx as well the newer longer one (xx) xxxxx-xxxx. Máscara de telefones brasileiros para EditText do Android: formata tanto o telefone padrão (xx) xxxx-xxxx, quanto o novo formato (xx) xxxxx-xxxx.
View BrPhoneNumberFormatter.java
/**
* Adapted to BR phone format from the class
* UsPhoneNumberFormatter by Samik Bandyopadhyay:
* http://stackoverflow.com/a/23659268/332839
*/
public class BrPhoneNumberFormatter implements TextWatcher {
final int MAX_LENGTH = 11;
//This TextWatcher sub-class formats entered numbers as (41) 1234(5)?-6789
@oliverswitzer
oliverswitzer / nonModuleDirList.js
Created Feb 24, 2014
An example of a script that will filter files with certain extensions in Node.js
View nonModuleDirList.js
// asynchDirList.js
var fs = require('fs'); //require node filesystem module
var path = require('path'); //require node path module (a couple of tools for reading path names)
var pathSupplied = process.argv[2];
var extFilter = process.argv[3];
function extension(element) {
var extName = path.extname(element);