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/python | |
# vim:set fileencoding=utf-8 sw=2 ai: | |
import sqlite3 | |
import datetime | |
import re | |
SQL = ''' | |
select | |
name, version, time, author, text |
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 python | |
""" | |
<Program Name> | |
say_lte.py | |
<Author> | |
Lukas Puehringer <luk.puehringer@gmail.com> | |
<Purpose> | |
Script to help me position my `Alcatel Linkhub HH40v` LTE modem for the |
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 python | |
""" | |
<Program Name> | |
count_html_elems.py | |
<Author> | |
Lukas Puehringer <luk.puehringer@gmail.com> | |
<Started> | |
May, 2018 |
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
""" | |
Sublime Text 3 command to find next or previous occurrence of a string in a tex | |
document and in the corresponding open pdf document, built with ST3 package | |
`LaTeXTools`, and displayed using OSX pdf viewer `skim`. | |
Add snippet to new *.py file in: | |
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/ | |
Handy keybindings: | |
(~/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-keymap |
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
""" | |
Tiny flask app that listens for incoming requests from a "GitHub webhook", | |
and, if the webhook was triggered by a push to the "native_client" repo, | |
calls the "Travis API" to trigger a build for the "lind_project" repo. | |
""" | |
import os | |
import json | |
import hmac | |
import hashlib | |
import requests |
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
// Self-educational go snippet to learn about the empty interface{} type. | |
// Based on @hvoecking's arbitrary structures traversal gist | |
// https://gist.github.com/hvoecking/10772475 | |
package main | |
import ( | |
"fmt" | |
"reflect" |
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
""" | |
Script to generate and write a basic TUF repo with keys, top-level roles, a | |
delegated targets role, and BIN_N_COUNT delegated targets roles, for profiling | |
purposes. | |
<Usage> | |
pip install securesystemslib[crypto,pynacl] tuf | |
curl https://gist.githubusercontent.com/lukpueh/724bd1d7b477f201a9f199b037d85747/raw/profile_tuf_bins.py -o profile_tuf_bins.py | |
python -m cProfile -o stats profile_tuf_bins.py |
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
# coding: utf-8 | |
"""Minimal tuf repo <-> client example, with unicode | |
- delegated targets role name, and | |
- target file name | |
""" | |
import os, tempfile, shutil, six | |
from tuf.repository_tool import * | |
from securesystemslib.process import subprocess, run_duplicate_streams |
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 python | |
"""Query GitHub REST API to get org permission for people and teams | |
Usage: | |
./gh_org_info.py <GitHub user name> <AuthToken> <organization name> | |
Note: To create an authentication token see | |
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token | |
Result: | |
{ | |
"people": { |
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
import os | |
import base64 | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
TIMEOUT = 10000 |
OlderNewer