Skip to content

Instantly share code, notes, and snippets.

View cassiolpaixao90's full-sized avatar
🎯
Focusing

Cassio Paixão cassiolpaixao90

🎯
Focusing
View GitHub Profile
@robertcoopercode
robertcoopercode / .zshrc
Last active March 31, 2024 01:08
Zsh configuration file
#------------------
# Shell Variables
#------------------
# Specify VS Code as default editor for the React Native Simulator
export REACT_EDITOR=code-insiders
# Set VS Code Insiders as default code editor
export EDITOR=code-insiders
# Android SDK
export ANDROID_HOME=~/Library/Android/sdk
@lirantal
lirantal / terminal-with-powerline.sh
Last active December 2, 2022 09:19
Hyper terminal + Powerline 9k terminal theme for oh-my-zsh
# Use hyper.is or iTerm2 as terminal emulators
# Install ohmyzsh
# https://github.com/robbyrussell/oh-my-zsh
# Copy over configs from ~/.bash_profile
# For example, it may have the nvm setup or any aliases like exa=ls and cat=bat
# ~/.hyper.js configuration:
copyOnSelect: true
@sdurandeu
sdurandeu / gist:2971d83d194203ac571f6c25cd2ff2fa
Created April 26, 2016 19:34
Validate credit card expiration with moment.js
// this code assumes a credit card is valid in the current month
var validateDate = function () {
var creditCardDate = moment($scope.data.expirationYear+$scope.data.expirationMonth, "YYMM");
var today = moment();
return creditCardDate.isValid() && (today < creditCardDate.add(1, 'months'));
}
@claudiosanches
claudiosanches / test.php
Last active October 22, 2025 18:10
Regex for test credit card brand
<?php
// Test cards
$cards = array(
'378282246310005', // American Express
'371449635398431', // American Express
'5078601870000127985', // Aura
'5078601800003247449', // Aura
'30569309025904', // Diners Club
'38520000023237', // Diners Club