Skip to content

Instantly share code, notes, and snippets.

View darlanmendonca's full-sized avatar

Darlan Mendonça darlanmendonca

View GitHub Profile

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
@darlanmendonca
darlanmendonca / gist:11d6ac7f414787dbb107
Last active August 29, 2015 14:16
To-do list de modules angular/node
Angular
- diretivas
lightbox gallery
carousel (múltiplos items, e direções)
file upload (checar o angular-file-upload)
NPM
- config (using shell-arguments to env)
@darlanmendonca
darlanmendonca / gist:c1abebc248d8394858c0
Last active August 29, 2015 14:18
my list of alias
# para editar o arquivo de configuração do zsh
# rode o comando abaixo
nano ~/.zshrc
# depois cole os alias abaixo
alias zshconfig="subl ~/.zshrc"
alias subl="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
alias susubl="sudo '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
@darlanmendonca
darlanmendonca / gist:6f46d3fc4f4fcb3357a9
Last active August 29, 2015 14:19
Redirect domain with www to domain without www
app.all '*', (req, res, next) ->
if req.headers.host.match /^www/
newUrl = req.headers.host.replace /^www\./, ''
res.redirect "http://#{newUrl}#{req.url}"
else
next()
@darlanmendonca
darlanmendonca / gist:19172d9ecb4d1af15c9f
Created May 11, 2015 14:50
Browser Sync to any folder
npm install -g browser-sync
alias start="browser-sync start --server --files 'css/*.css, *.html, js/*.js'"
@darlanmendonca
darlanmendonca / gulpfile.js
Created April 28, 2016 14:06 — forked from jbarrus/gulpfile.js
protractor coverage support with gulp and istanbul (not tested, this is just extracted from larger files to demonstrate how to get protractor coverage working)
var istanbul = require('istanbul'),
gulp = require('gulp'),
istanbul = require('gulp-istanbul');
gulp.task('js', function() {
return gulp.src('js')
.pipe(istanbul({
includeUntested: true,
coverageVariable: '__coverage__'
}))
- sidebar enhancements
- editorconfig
- material theme
- emmet
- status bar file size
- syntax highlights(less, sass, javascript next, ejs, pug)
- Markdown Extended https://github.com/jonschlinkert/sublime-markdown-extended

Integers

Type Min Max
Int8 -128 127
UInt8 0 255
Int16 -32.768 32.767
UInt16 0 65.535
Int32 -2.147.483.648 2.147.483.647
UInt32 0 4.294.967.295
@darlanmendonca
darlanmendonca / node-and-npm-in-30-seconds.sh
Created July 18, 2016 20:22 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@darlanmendonca
darlanmendonca / webkit-pseudo-elements.md
Created August 25, 2016 17:37 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;