This file contains 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 bash | |
# Copyright 2023 - Marco Trevisan | |
# Released under the GPLv3 terms | |
# | |
# A simple tool to simulate PAM authentication using GDM smartcard settings. | |
# | |
# This can also be used in interactive mode to test GDM login from the UI, by | |
# setting the environment variable `WAIT`, so that the script will restart the | |
# gdm service and will allow the user to login it using its name and a provided | |
# `PIN` (123456 by default). |
This file contains 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
#include <glib.h> | |
#include <json-glib/json-glib.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <security/pam_appl.h> | |
#include <security/pam_modules.h> | |
/* expected hook */ | |
PAM_EXTERN int |
This file contains 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 bash | |
# | |
# Use | |
# eval $(prefix-builder.sh [add|rm|prepend|append] folder) | |
# | |
# or Alias such as: | |
# function eval_cmd() { eval $($*); } | |
# alias build-prefix="eval_cmd prefix-builder.sh" | |
# alias add-build-prefix="eval_cmd prefix-builder.sh add" | |
# alias rm-build-prefix="eval_cmd prefix-builder.sh rm" |
This file contains 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 | |
SCHEMA_URI="https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.1/Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd" | |
IMPORTED_SCHEMAS=(xmldsig-core-schema.xsd) | |
IMPORTED_SCHEMAS_BASE_URI="https://raw.githubusercontent.com/italia/fatturapa-testsdi/master/core/schemas/" | |
tmp_dir=$(mktemp -d -t fe-xml-lint-XXXXXXXXXX) | |
schemas=("$SCHEMA_URI") |
This file contains 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
# Initial commit |
This file contains 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 | |
USER_NAME=$(who | grep tty$(sudo fgconsole) | cut -f1 -d' ') | |
USER_ID=$(id -u "$USER_NAME") | |
HDMI_STATUS=$(</sys/class/drm/card0/*HDMI*/status) | |
HDMI_CARD="pci-0000_00_03.0" | |
HDMI_PROFILE="hdmi-stereo-extra1" | |
INTERNAL_CARD="pci-0000_00_1b.0" |
This file contains 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
[CCode (lower_case_cprefix = "Py_", cheader_filename = "Python.h")] | |
namespace Python | |
{ | |
public void Initialize (); | |
public void Finalize (); | |
[CCode (lower_case_cprefix = "PyRun_")] | |
namespace Run | |
{ | |
public void SimpleString (string @string); |
This file contains 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 | |
# Simple script to convert SVG icons to fitbit grayscale magic compatible PNGs | |
# Usage: convert-svg.sh [icons-path] | |
# | |
# Author: Marco Trevisan (Treviño) <mail@3v1n0.net> | |
# Licensed under GPLv3 | |
PNG_SIZE=${PNG_SIZE:-80} | |
icons_path=${1:-$(dirname "$0")} |
This file contains 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/python3 | |
import json | |
import sys | |
import os | |
import re | |
import copy | |
input = sys.argv[1] |