Skip to content

Instantly share code, notes, and snippets.

View hugovk's full-sized avatar

Hugo van Kemenade hugovk

View GitHub Profile
@eyeseast
eyeseast / python.md
Last active November 6, 2023 01:32
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 18, 2024 11:20
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active April 15, 2024 13:47 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@carlosefonseca
carlosefonseca / StatsHunters.com animation.js
Created November 22, 2020 20:33
Paste this into the dev console in statshunters.com map view and see an animation of your activities.
var setDate = new Date("2019-01-01");
var today = new Date();
var dateDiv = document.getElementById("date")
if (dateDiv === null) {
dateDiv = document.createElement("div")
dateDiv.id = "date"
dateDiv.style = "float: left; margin-left: 30px; margin-top: 15px;"
$("#total").parent().append(dateDiv)
}
@aaltat
aaltat / py_finder.py
Last active March 2, 2020 00:03
Find files which are not Python 3 compatible
import argparse
import subprocess
from pathlib import Path
def find_files(src_root: Path, python3: Path):
not_py3_compatible = []
for file in src_root.rglob('*.py'):
print(file.resolve())
@tirkarthi
tirkarthi / py3_issues.md
Last active February 18, 2020 16:21
Python 3.8 and 3.9 issues

Do take one issue per person to help others :) Also checkout Fedora tracker for more easy issues : https://bugzilla.redhat.com/show_bug.cgi?id=1785415 . I tried to mark the issues complete but it's more maintenance so sorry if the issue is fixed or already has a PR and is not updated here.

@sloria
sloria / dropping_py2.md
Last active August 14, 2022 13:26
Checklist for dropping Python 2 in my libraries
  • Add pyupgrade to .pre-commit-config.yaml.

If supporting py35, use --py3-plus instead of --py37-plus.

- repo: https://github.com/asottile/pyupgrade
  rev: ...latest version...
  hooks:
  - id: pyupgrade
 args: [--py37-plus]
@nnja
nnja / .pdbrc
Created August 2, 2019 12:55
My .pdbrc file with an interacti alias
# Install IPython: python3 -m pip install ipython
import IPython
from traitlets.config import get_config
cfg = get_config()
cfg.InteractiveShellEmbed.colors = "Linux" # syntax highlighting
cfg.InteractiveShellEmbed.confirm_exit = False
alias interacti IPython.embed(config=cfg)
@mieky
mieky / macos-lifehacks.md
Last active December 2, 2023 21:10
MacOS Lifehacks

Collection of useful tips & tricks to set up on a Mac.

Safari: bind cmd+alt+arrows to switch between previous/next tab

defaults write -app Safari NSUserKeyEquivalents '{
"Show Next Tab" = "@~\\U2192";
"Show Previous Tab" = "@~\\U2190";
}'
@mortenson
mortenson / metatag_example.php
Created February 26, 2019 23:29
OR statements in metatags...
<?php
/**
* Implements hook_metatags_attachments_alter().
*
* This function allows you to define fallback tokens in case a field is empty.
*
* If all fallback values are empty, the tag will be empty.
*
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png