Skip to content

Instantly share code, notes, and snippets.

View mahakaal's full-sized avatar
💭
Manners Maketh Men

Sukhdev Mohan mahakaal

💭
Manners Maketh Men
View GitHub Profile
@mahakaal
mahakaal / default.conf
Created August 18, 2023 13:20
nginx configuration
server {
listen 80;
index index.php;
server_name croppa.local;
root /var/www/html/croppa/public;
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
location / {
table = document.getElementById('ind_vacc_mp_tbl')
total = {dose1: 0, dose2: 0, tot_vac: 0}
rows = table.childNodes[2].children.length
for(i=0; i < rows; i++) {
row = table.childNodes[2].children[i]
total.dose1 += parseInt(row.children[1].innerText.split('\n')[0].replace(/,/g, ''), 10)
total.dose2 += parseInt(row.children[2].innerText.split('\n')[0].replace(/,/g, ''), 10)
total.tot_vac += parseInt(row.children[3].innerText.split('\n')[0].replace(/,/g, ''), 10)
}

Keybase proof

I hereby claim:

  • I am mahakaal on github.
  • I am themahakaal (https://keybase.io/themahakaal) on keybase.
  • I have a public key ASD8eGZ5aquPvwb23ryFTKylhK9in0CsHnH0k4m0MErE_wo

To claim this, I am signing this object:

{*<!--
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
-->*}
<?php
$document = "
Line - 1*
Slavic 07:00 - Flint 7:30;
Slavic 08:00 - Flint 8:30;
Slavic 09:00 - Flint 09:30;
Line - 12*
Dynamo 10:00 - Kaufland 10:30;
Dynamo 10:30 - Kaufland 11:00;
#!/usr/bin/env bash
echo <<EOF
.----------------. .----------------. .----------------. .----------------.
| .--------------. | | .--------------. | | .--------------. | | .--------------. |
| | _____ | | | | _________ | | | | ____ ____ | | | | ______ | |
| | |_ _| | | | | |_ ___ | | | | ||_ \ / _|| | | | |_ __ \ | |
| | | | | | | | | |_ \_| | | | | | \/ | | | | | | |__) | | |
| | | | _ | | | | | _| _ | | | | | |\ /| | | | | | | ___/ | |
| | _| |__/ | | | | | _| |___/ | | | | | _| |_\/_| |_ | | | | _| |_ | |
@mahakaal
mahakaal / mercurio.php
Created December 26, 2018 21:52
login with cURL
<?php
// settings
// ...
//
//init curl
$ch = curl_init();
// delete any previous still active session
@mahakaal
mahakaal / test.php
Created December 18, 2018 15:59
test
<?php
echo 'ciao';
@mahakaal
mahakaal / main.C
Created November 19, 2017 16:25
Puntatori esempi
/*
* File: main.c
* Author: Sukhdev Mohan <sukhdev.mohan@gmail.com>
*
* Quest'opera è stata rilasciata con licenza
* Creative Commons Attribuzione - Non commerciale - Condividi allo stesso modo 4.0 Internazionale.
* Per leggere una copia della licenza visita il sito web http://creativecommons.org/licenses/by-nc-sa/4.0/.
*/
#include <stdio.h>