- 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 hidden or 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
# clean up remote branches | |
git checkout master && git pull | |
git branch -r --merged | egrep -v "master|dev" | sed 's/origin\//:/' | xargs -n 1 git push origin | |
# clean up local branches | |
git branch --merged | egrep -v "master|dev" | sed 's/origin\//:/' | xargs -n 1 git branch -D |
This file contains hidden or 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
# docker run -it --rm percona:5 --verbose --help | |
mysqld Ver 5.7.25-28 for Linux on x86_64 (Percona Server (GPL), Release 28, Revision c335905) | |
Copyright (c) 2009-2019 Percona LLC and/or its affiliates | |
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. |
This file contains hidden or 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
/t/lxc $ lxc-checkconfig | |
Kernel configuration not found at /proc/config.gz; searching... | |
Kernel configuration found at /boot/config-4.15.0-34-generic | |
--- Namespaces --- | |
Namespaces: enabled | |
Utsname namespace: enabled | |
Ipc namespace: enabled | |
Pid namespace: enabled | |
User namespace: enabled | |
Warning: newuidmap is not setuid-root |
This file contains hidden or 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 | |
// prepare key for read with openssl_x509_read() | |
$begin = "-----BEGIN CERTIFICATE-----\n"; | |
$end = "-----END CERTIFICATE-----\n"; | |
$cert = file_get_contents(__DIR__ . '/apple_pay.cer'); | |
$cert = implode("\n", str_split(base64_encode($cert), 76)); | |
$certRes = openssl_x509_read($begin . $cert . "\n" . $end); | |
// read public key |
This file contains hidden or 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
apt-get install parted | |
parted | |
unit MB | |
print free | |
resizepart $extended_number $end | |
resizepart $logical_number $end | |
quit | |
pvresize /dev/sda5 | |
# For extending ext3 or ext4 partition |
This file contains hidden or 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/bash | |
device='SynPS/2 Synaptics TouchPad' | |
state=`xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$"` | |
if [ $state == '1' ]; then | |
xinput disable "$device" && notify-send "Touchpad" "Disabled" -i gtk-info | |
else | |
xinput enable "$device" && notify-send "Touchpad" "Enabled" -i gtk-info | |
fi |
This file contains hidden or 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
*nat | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
# Docker rule for outgoing connections from containers | |
-A POSTROUTING ! -o docker0 -s 172.16.0.0/12 -j MASQUERADE | |
COMMIT | |
*filter |
This file contains hidden or 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
[37614.819688] WARNING: CPU: 3 PID: 0 at /build/linux-5vkMGy/linux-4.4.0/net/mac80211/rx.c:3639 ieee80211_rx_napi+0x917/0x930 [mac80211]() | |
[37614.819692] Modules linked in: rtl8xxxu ctr ccm pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) hid_generic hidp cmac rfcomm rtsx_usb_ms memstick ax88179_178a usbnet mii arc4 bnep nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass input_leds joydev uvcvideo mac80211 serio_raw videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common hid_sensor_incl_3d hid_sensor_accel_3d videodev hid_sensor_magn_3d cfg80211 hid_sensor_gyro_3d hid_sensor_rotation btusb hid_sensor_trigger industrialio_triggered_buffer btrtl hid_sensor_iio_common snd_hda_codec_hdmi hid_multitouch btbcm btintel bluetooth media snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event | |
[37614.819768] snd_rawmidi acpi_als ideapad_laptop kfifo_buf industri |
This file contains hidden or 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
#time-format %H:%M:%S | |
date_format %d/%b/%Y | |
log_format "%h %^ [%d:%~ %^] \"%m %r %H\" %s %b \"%R\" \"%u\" \"%T\" \"%^\" \"%^\" \"%^\" \"%^\" |
NewerOlder