Skip to content

Instantly share code, notes, and snippets.

@bertrandmartel
bertrandmartel / build_curl.md
Last active May 27, 2025 16:11
Build Curl for Android NDK

Build libcurl for android NDK

Libcurl requires openssl and zlib to be fully operationnal

  • Step 1 : cross compile zlib
  • Step 2 : cross compile openssl
  • Step 3 : cross compile curl with zlib/openssl external link

Prerequisites :

@calkan
calkan / gist:eaad0bc4458da16a72dd
Last active January 5, 2021 02:09
Michael Hoffman's crazy bash_history backer upper on git
1 - Create a *private* GitHub/Bitbucket or similar git repo. Here I assume the repo is:
https://github.com/calkan/bash_history.git
2 - Create .history directory and initialize it for the repo:
mkdir $HOME/.history
cd $HOME/.history
git init
touch README.md
@remitamine
remitamine / m3u8_downloader.py
Last active May 17, 2024 01:59
youtube-dl m3u8 wrapper
from sys import argv
import os
import re
import subprocess
import urllib.request
import urllib.parse
import youtube_dl
from gi.repository import Notify
@toejough
toejough / ssh-agent-forward.md
Last active February 25, 2024 10:51
SSH Agent Forwarding in Python: Paramiko's undocumented API

What

A how-to for ssh-agent forwarding via Paramiko. Specifically, I used Paramiko v1.15.2 in this example.

Why

Paramiko's docs do not document the API required to do ssh-agent forwarding. I ended up finding out how by reading pull requests for ssh-agent forwarding features in frameworks that use Paramiko under the covers, like fabric and ansible.

Update:

Besides attempting to document this process here, I've opened a bug with Paramiko to document this API in their official docs.

How

@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active July 25, 2025 07:24
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@shouptech
shouptech / get_zyxel_modem_stats.py
Created March 23, 2015 19:27
A script to query a ZyXEL Q100Z modem and output data in a format usable by Cacti
#!/usr/bin/python
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mike Shoup
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@ageis
ageis / openpgp-card-guide.md
Last active February 14, 2026 07:20
Quick GPG Smartcard Guide
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active March 29, 2026 10:13
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@zed
zed / url2filename.py
Last active July 25, 2025 07:23
Extract filename from an url
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import posixpath
try:
from urlparse import urlsplit
from urllib import unquote
except ImportError: # Python 3
from urllib.parse import urlsplit, unquote
@Avaq
Avaq / pull-private.sh
Created November 4, 2014 12:25
Exporting and importing GPG keys over SSH
ssh user@remote gpg --export-secret-key KeyId | gpg --allow-secret-key-import --import