Skip to content

Instantly share code, notes, and snippets.

@keyro90
keyro90 / json_parser.c
Created January 31, 2022 19:20 — forked from alan-mushi/json_parser.c
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;

Keybase proof

I hereby claim:

  • I am keyro90 on github.
  • I am keyro_lomax (https://keybase.io/keyro_lomax) on keybase.
  • I have a public key ASAa4kJ3pPyb5biJP5NtRCNua9WdOiMB2NVR-59ivT-dQQo

To claim this, I am signing this object:

@keyro90
keyro90 / gist:89dfc0212763b5b224d8f990367749f6
Created September 2, 2021 12:19
Postgresql dump with docker container script
#!/usr/bin/env bash
HOST=""
PORT=""
DB=""
USER=""
PASSWORD=""
PGSQL_VERSION=""
mkdir -p tmp
@keyro90
keyro90 / main.py
Created January 2, 2021 15:13
Convert JSON to environment variables for C# application settings
import argparse
import json
import re
import sys
from json.decoder import JSONDecodeError
MIN_ARGS = 2
ERROR_MIN_ARGS = 1
ERROR_FILE_FORMAT = 2
@keyro90
keyro90 / pyuac.py
Created July 22, 2020 10:31 — forked from sylvainpelissier/pyuac.py
pyuac - elevate a Python process with UAC on Windows compatible Python 3.
#!/usr/bin/env python
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4
"""User Access Control for Microsoft Windows Vista and higher. This is
only for the Windows platform.
This will relaunch either the current script - with all the same command
line parameters - or else you can provide a different script/program to
run. If the current user doesn't normally have admin rights, he'll be

Keybase proof

I hereby claim:

  • I am keyro90 on github.
  • I am keyro90 (https://keybase.io/keyro90) on keybase.
  • I have a public key ASDkHJfOtL1u-GPXH_peVdu-dl_W0gGEHUZUihzr5fX_ago

To claim this, I am signing this object:

#!/bin/bash
set -e
if [[ $# != 1 ]] ; then
echo 'Il comando chiede un argomento, la cartella dove scansionare'
exit 0
fi
RED='\033[1;31m'