- Amex Card:
^3[47][0-9]{13}$
- BCGlobal:
^(6541|6556)[0-9]{12}$
- Carte Blanche Card:
^389[0-9]{11}$
- Diners Club Card:
^3(?:0[0-5]|[68][0-9])[0-9]{11}$
- Discover Card:
^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
- Insta Payment Card:
^63[7-9][0-9]{13}$
- JCB Card:
^(?:2131|1800|35\d{3})\d{11}$
- KoreanLocalCard:
^9[0-9]{15}$
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Ubiquiti Unifi Controller on Ubuntu 20.04. | |
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020. | |
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps. | |
sudo apt update | |
sudo apt install --yes apt-transport-https | |
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list | |
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// how to run: | |
// php download_refunds.php | |
// Works on Mac OS X | |
// It will generate (and overwrite) a csv file with name refunds.csv | |
// Update your valid Live Secret Key, this is only a test key: | |
$skey = 'skey_'; | |
// Output file name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// how to run: | |
// php download_disputes.php | |
// Works on Mac OS X | |
// It will generate (and overwrite) a csv file with name disputes.csv | |
// Update your valid Live Secret Key, this is only a test key: | |
$skey = 'skey_'; | |
// Output file name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Mac OSX Adblocker Script for IPv4 | |
# Description: Blocks ads using system hosts file /private/etc/hosts, Ad-Domains would be redirected to 0.0.0.0 | |
# Author: Daniel Hochleitner | |
# Created: 10.09.2015 | |
# Use: sudo ./adblock_hosts.sh | |
# Get original hosts file from /private/etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my_nat_cookbook/attributes/default.rb | |
# specify your CIDR in custom JSON somewhere: { "my_nat_cookbook": { "source_cidr": "10.1.0.0/16" } } | |
default[:deliv_nat][:source_cidr] = '0.0.0.0/0' | |
default[:deliv_nat][:aws_region] = node[:opsworks][:instance][:region] | |
default[:deliv_nat][:ec2_instance_id] = node[:opsworks][:instance][:aws_instance_id] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# patch for make ruby error | |
# % rbenv install 1.8.7-p375 | |
# ... | |
# ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function) | |
# ossl_pkey_ec.c:815: error: (Each undeclared identifier is reported only once | |
# ossl_pkey_ec.c:815: error: for each function it appears in.) | |
# make[1]: *** [ossl_pkey_ec.o] error 1 | |
# ... | |
# | |
# refs: http://forums.cpanel.net/f5/case-84173-error-installing-ruby-377831.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :workers do | |
namespace :clockwork do | |
desc "Stop clockwork" | |
task :stop do | |
on roles(:app) do | |
within release_path do | |
with rails_env: fetch(:rails_env) do | |
execute :bundle, :exec, :clockworkd, "-c lib/clockwork.rb --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} stop" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def osascript(script) | |
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
end | |
osascript <<-END | |
tell application "Finder" | |
display dialog "Hello" | |
end tell | |
END |
NewerOlder