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 |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
// List all files in a directory in Node.js recursively in a synchronous fashion | |
var walkSync = function(dir, filelist) { | |
var fs = fs || require('fs'), | |
files = fs.readdirSync(dir); | |
filelist = filelist || []; | |
files.forEach(function(file) { | |
if (fs.statSync(dir + file).isDirectory()) { | |
filelist = walkSync(dir + file + '/', filelist); | |
} | |
else { |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
Give developers more knowledge about how the classes behave in a non-relative sense: BEM + ITCSS = BEMIT
BEM:
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
/** | |
* Created by Fabian on 19/10/2016. | |
*/ | |
import { Component, ElementRef, Input } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
@Component({ | |
selector: 'file-upload', | |
template: '<input type="file" [attr.multiple]="multiple ? true : null" (change)="upload()" >' | |
}) | |
export class FileUploadComponent { |