Skip to content

Instantly share code, notes, and snippets.

View lidopaglia's full-sized avatar

Lido Paglia lidopaglia

View GitHub Profile
@lidopaglia
lidopaglia / python_ldaps.py
Created August 7, 2021 15:47
python-ldaps
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import sys
import getpass
import ldap
def getLdapUsers():
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
l = ldap.initialize('ldaps://ldap.example.com')
@lidopaglia
lidopaglia / curl.md
Created August 7, 2021 15:31 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@lidopaglia
lidopaglia / rhysider-books.md
Last active March 12, 2022 19:32
Jack Rhysider's Favorite Books

Jack Rhysider's Favorite Books

jack rhysider

Jack Rhysider, creator of the [Darknet Diaries][10] podcast, was recently interviewed on [Paul's Security Weekly Podcast #702][6] and the following books are [highlighted in the interview][8] as some of Jack's favorite.

  1. [Countdown to Zero Day: Stuxnet and the Launch of the World's First Digital Weapon][1] by Kim Zetter
# Gnome Terminal Gruvbox
#
# Import/Export Gnome Terminal profile(s) with:
#
# dconf dump /org/gnome/terminal/legacy/profiles:/:a49b6940-a9ef-4922-b874-574cad1da151/ > ~/Downloads/gruvbox.dconf
# dconf load /org/gnome/terminal/legacy/profiles:/:a49b6940-a9ef-4922-b874-574cad1da151/ < ~/Downloads/gruvbox.dconf
#
# https://gist.github.com/reavon/0bbe99150810baa5623e5f601aa93afc
[/]
@lidopaglia
lidopaglia / gist:706fb580b11ce1281b217199c915d932
Created March 10, 2021 15:07 — forked from alexandernl/gist:8090a79a7af4197c5f5571e8cc8c05b8
Convert daily New York Times frontpage to jpg
<?php
// set the output-file
$outputfile = "/var/www/nyt/nyt.jpg";
// set path to todays NYT frontpage
$pathToPdf="https://static01.nyt.com/images/".date('Y')."/".date('m')."/".date('d')."/nytfrontpage/scan.pdf";
// check if there is any today
$file_headers = @get_headers($pathToPdf);
@lidopaglia
lidopaglia / dot-install.sh
Created May 23, 2020 15:27
Install dotfiles on an existing system
!#/bin/sh
git clone --bare [email protected]:lidopaglia/dotfiles.git $HOME/.dotfiles
function dot {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}
mkdir -p .dotfiles-backup
dot checkout
@lidopaglia
lidopaglia / karabiner_launch_apps.json
Created April 19, 2020 17:48
example rule for opening iTerm2 with command+shift+t with Karabiner Elements
# https://karabiner-elements.pqrs.org/docs/json/location/
{
"title": "Launch apps",
"rules": [
{
"description": "Launch iTerm with command + shift + t",
"manipulators": [
{
"from": {
@lidopaglia
lidopaglia / fix-infinality.md
Created April 1, 2020 17:15 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@lidopaglia
lidopaglia / improve_fonts.txt
Created April 1, 2020 17:10 — forked from j1cs/improve_fonts.md
Improve fonts archlinux
### Update
Make your Arch fonts beautiful easily!
This is what I do when I install Arch Linux to improve the fonts.
You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):
Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts
Enable font presets by creating symbolic links: