Skip to content

Instantly share code, notes, and snippets.

View jonathangoncalves's full-sized avatar

Jonathan Gonçalves jonathangoncalves

View GitHub Profile
@yanwei07
yanwei07 / Set A Custom Screen Resolution in Ubuntu Desktop
Created January 2, 2020 08:07
How to Set A Custom Screen Resolution in Ubuntu Desktop
1. run command: xrandr
it output current screen resolution as well as available solutions. All we need here is the display device name.
examle device name : virtual1.
2. Run command to calculate VESA CVT mode lines by given resolution which you will add value, example :
sudo cvt 1600 900
if your device support this resolution, terminal would output it's ability. look follow output:
1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
@claudiosanches
claudiosanches / test.php
Last active April 8, 2025 20:36
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