Skip to content

Instantly share code, notes, and snippets.

View jirikuncar's full-sized avatar
💭
👨‍💻

Jiri Kuncar jirikuncar

💭
👨‍💻
View GitHub Profile
@boboTjones
boboTjones / blogsnthingz.txt
Created March 29, 2025 15:11
Blogs, podcasts and assorted sites
https://blog.talosintelligence.com/
https://cyberscoop.com/
https://danielmiessler.com/
https://darknetdiaries.com/
https://ecrime.ch/
https://filippo.io/
https://googleprojectzero.blogspot.com/
https://intelnews.org/
https://isc.sans.edu/podcast.html
https://jvns.ca/
@jgadling
jgadling / main.py
Last active June 12, 2025 09:05
Example of using Strawberry FieldExtensions to implement FastAPI dependency injection in resolvers
# This snippet is valid for older FastAPI versions.
# For an updated DependencyExtension that works with FastAPI 0.115.0, refer to this gist:
# https://gist.github.com/jgadling/bf27a924cd9c34a2a64d2dbf8a5507e6
import typing
import strawberry
import uvicorn
from fastapi import Depends, FastAPI
@djm
djm / .envrc
Created September 20, 2022 23:17
YunoJuno Nix Developer Environment
export OP_ACCOUNT=yunojuno.1password.com
# Create .env.local if it does not exist
if [ ! -f .env.local ]
then
echo "Creating .env.local"
cat <<EOF > .env.local
# Place secret env variables from 1Password and custom overrides here
#
# Any variables here will override ones set in .env.native.dist
@lukeramsden
lukeramsden / midString.sql
Created June 24, 2020 08:01
PL/pgSQL implementation of a LexoRank-style lexicographical rank generator function
-- https://stackoverflow.com/questions/38923376/return-a-new-string-that-sorts-between-two-given-strings
create or replace function app_public.mid_string(prev text, next text) returns text as $$
declare
v_p int;
v_n int;
v_pos int := 0;
v_str text;
begin
LOOP -- find leftmost non-matching character
v_p := CASE WHEN v_pos < char_length(prev) THEN ascii(substring(prev from v_pos + 1)) ELSE 96 END;
@maelvls
maelvls / How-to-automate-build-bottles-your-homebrew-tap.md
Last active February 23, 2025 20:02
Automate build workflow for Homebrew tap bottles (Linux and macOS)

How to automate the build of bottles on your Homebrew tap

Note on Oct 4, 2018: due to a change in Homebrew's brew test-bot behaviour, the user must set HOMEBREW_TRAVIS_CI and HOMEBREW_TRAVIS_SUDO appropriately (it was previously using Travis-CI-provided TRAVIS and TRAVIS_SUDO).

This tutorial is a follow-up to the discussion we had on davidchall/homebrew-hep#114. It relies on a fork of the test-bot provided by davidchall; you can get it with brew tap maelvalais/test-bot. First:

  1. the Github project must be of the form https://github.com//homebrew- with the following tree
import collections
import datetime
import logging
from goblin import properties
logger = logging.getLogger(__name__)
CARD_MAPPING = {'Cardinality.single': 'Cardinality.SINGLE',
@qoomon
qoomon / TravisGitHub.md
Last active September 16, 2024 18:50
Setup GitHub Deploy Keys For Travis
@karlhorky
karlhorky / .gitconfig
Last active July 18, 2023 01:28 — forked from gnarf/..git-pr.md
Fetch and delete refs to GitHub pull request branches
[alias]
fetch-pr = "!f() { git fetch origin refs/pull/$1/head:pr/$1; } ; f"
delete-prs = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
@tkrajina
tkrajina / call_method_with_reflection.go
Created April 1, 2016 09:14
Golang, call method (and fill arguments) with reflection
package main
import (
"fmt"
"reflect"
)
type Aaa struct {
a string
}
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}