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
| #!/usr/bin/env perl | |
| use Mojolicious::Lite -signatures; | |
| use Mojo::UserAgent; | |
| use Crypt::X509; | |
| use Crypt::JWT ':all'; | |
| use Crypt::PK::RSA; | |
| use JSON::XS; | |
| use HTML::Table; | |
| use Data::Format::Pretty::JSON qw(format_pretty); |
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
| #!/usr/bin/env perl | |
| use Mojolicious::Lite -signatures; | |
| use DBIx::Simple; | |
| use DBI; | |
| use URI::Escape qw(uri_escape); | |
| # Global database configuration | |
| our %db_config = ( | |
| database => 'ledger28', | |
| user => 'postgres', |
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 9 columns, instead of 8 in line 4.
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
| c2,c3,c4,c5,c6,c7,c8,c9,c10 | |
| customernumber,datepaid,AR_paid_1,AR,amount,description,source,memo,department | |
| C-0081,17/02/2025,10100,11101,260000,,10500,online,SALES | |
| C-0040,17/02/2025,10100,11101,165000,,10500,online,ACCOUNTS | |
| C-0182,17/02/2025,10100,11101,171125,,10500,online | |
| C-0152,17/02/2025,10100,11101,57341,,10100,cash | |
| C-0059,17/02/2025,10100,11101,82489,,10500,online | |
| C-0117,17/02/2025,10100,11101,159431,,10500,online | |
| C-0037,17/02/2025,10100,11101,185601,,10100,cash | |
| C-0164,17/02/2025,10100,11101,18488,,10100,cash |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my $username = 'postgres'; | |
| my $sql_file = 'dbchanges.sql'; | |
| my @databases = `psql -U $username -l -t | cut -d '|' -f 1`; | |
| foreach my $db (@databases) { |
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 | |
| # extract all postgres databases from a sql file created by pg_dumpall | |
| # this script outputs one .sql file for each database in the original .sql file | |
| # unless you pass the name of a database in the dump | |
| if [ $# -lt 1 ] | |
| then | |
| echo "Usage: $0 <postgresql sql dump> [dbname]" >&2 | |
| exit 1 | |
| 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
| <form action="https://hotel4u.pk/marcopolomurree/rooms" method="GET" target="_blank" class="form-container"> | |
| <input type="date" name="checkin_date" id="datePicker" class="item" onfocus="this.showPicker()"> | |
| <!-- Remove the "nights" field --> | |
| <input type="date" name="checkout_date" id="checkoutDatePicker" class="item" onfocus="this.showPicker()"> | |
| <select name="adults" id="adults" class="form-item"> | |
| <option value="1">1 Adult</option> | |
| <option value="2">2 Adults</option> | |
| <option value="3">3 Adults</option> | |
| <option value="4">4 Adults</option> | |
| <option value="5">5 Adults</option> |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use DBI; | |
| my $driver = "Pg"; | |
| my $database = "postgres"; | |
| my $dsn = "DBI:$driver:dbname=$database;host=localhost"; | |
| my $userid = "postgres"; |
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
| use strict; | |
| use warnings; | |
| use DBIx::Simple; | |
| sub is_room_available { | |
| my ($room, $checkin_date, $checkout_date) = @_; | |
| # Connect to the database | |
| my $db = DBIx::Simple->connect("DBI:Pg:dbname=test1", 'postgres', '', { RaiseError => 1, AutoCommit => 1 }) | |
| or die "Failed to connect: $DBI::errstr"; |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use DBI; | |
| my @tables = ( 'chart', 'curr', 'defaults' ); | |
| my $output_file = 'RMADE_DEU_Basiskontenplan-chart.sql'; | |
| my $db_name = 'ledger28'; |
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
| <!DOCTYPE html> | |
| <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="x-apple-disable-message-reformatting"> | |
| <title>Ambiance Boutique Art Hotels</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;600&display=swap" rel="stylesheet"> | |
| </head> |
NewerOlder