Skip to content

Instantly share code, notes, and snippets.

View mayanez's full-sized avatar
👨‍💻

Miguel A. Arroyo mayanez

👨‍💻
View GitHub Profile
@sander1
sander1 / pushover-notify.local
Last active January 9, 2025 03:33
Send Pushover notification from Fail2Ban
# Fail2Ban configuration file
#
[Definition]
# Notify on Startup
actionstart = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been started successfully." https://api.pushover.net/1/messages
# Notify on Shutdown
actionstop = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been stopped." https://api.pushover.net/1/messages
@jerome-pouiller
jerome-pouiller / cross-compile-ldd
Last active March 10, 2025 02:05
ldd drop-in replacement for cross-compilation toolchains.
#!/bin/bash
# ldd drop-in replacement for cross-compilation toolchains.
# Copyright (c) 2022 Jérôme Pouiller
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
@thestinger
thestinger / 0_todo.md
Last active July 11, 2021 14:46
-fstack-protector-all with return address XOR (per 1999 StackGuard)
  1. Tests!
  2. Configuration
  3. Clang user interface
  4. add a better heuristic to use with this than -fstack-protector-all ("can corrupt memory" -> canary)
  5. support leaving SelectionDAG SSP enabled for sibling call optimization compatibility

The AArch64 implementation is far from ideal performance-wise, since it depends on forcing the generation of a proper frame to store and load the return address. It's not clear how to improve this yet.

@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active March 31, 2025 15:46
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@retrography
retrography / annotex.py
Last active November 20, 2024 14:45
PDF highlight and annotation extractor
#!/usr/bin/env python
__author__ = 'Mahmood S. Zargar'
import poppler
import sys
import urllib
import os
def main():
@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
@airstruck
airstruck / multilove.md
Last active August 2, 2024 13:56
Installing multiple versions of LÖVE

Installing multiple versions of LÖVE

This document explains how to set up multiple LÖVE installations. Make sure you have all dependencies for the versions of LÖVE you want to install.

Initial setup

Make a directory to install LÖVE source and binaries into.

mkdir $HOME/love/
@arkival
arkival / intel-edison-cmdline.md
Last active March 21, 2018 00:31
C/C++ cross compilation from the command line for the Intel Edison

C/C++ cross compilation from the command line for the Intel Edison

It is not necessary to use the Eclipse environment in order to compile code for the Intel Edison. Command line compilation is possible on all platforms and is relatively straightforward. For linux and OS/X the simplest method is to download the SDK for the respective platform and setup as described below. Although Intel lists SDKs for both 32 and 64 bit Windows, I find it simpler to setup command line compilation from the integrated IOT platform installation.

All three platforms use the GNU compiler tools (gcc, g++, and friends) and the main differences really come down to differences in the command shell usage. Consequently, the procedures have the following common elements.

  1. Install the cross compilation tool chain and library file-system.
  2. Setup the path so that the operating system can find the compilers and other utilities.
  3. Setup environment variables to simplify the command line and tell the compilers where to find librari
#!/bin/tcsh
# Grab user information.
echo "PrivateInternetAccess OpenVPN Setup:"
echo " https://www.privateinternetaccess.com/pages/client-control-panel"
echo " -> PPTP/L2TP/SOCKS Username and Password"
echo -n "User: "
set user = $<
echo -n "Pass: "
set pass = $<
@trcook
trcook / index.md
Last active February 11, 2022 09:29
how to fix a bunch of nested submodules so that they are subtrees

Submodules and nested submodules

You have a project with a submodule and a nested submodule. it took me a while to figure out how to convert it to subtrees.

why convert to subtrees:

The basic reason is to convert is to make it so that deployment and installation by others is easier and doesn't create as many problems when branching.

basic steps:

The basic process to do this (there are others that involve splitting, but i found this to be easier). in a repo named with a :