Skip to content

Instantly share code, notes, and snippets.

View pkirkovsky's full-sized avatar

Pavel Kirkovsky pkirkovsky

View GitHub Profile
@unglitched
unglitched / iterm2kitty.py
Created January 24, 2020 01:18
Convert .itermcolors file to kitty term theme colors
#!/usr/bin/env python3
#
# Convert .itermcolors files to kitty terminal color settings.
# Modded from https://gist.github.com/MSylvia/4e90860743f1a4de187d
# Might need to adjust dicts[i][NUMBER].text per your file.
import sys
import xml.etree.ElementTree as ET
def rgb_to_hex(rgb):
@jaydorsey
jaydorsey / ublock
Last active April 17, 2024 15:12
uBlock for LinkedIn
# Block things on LinkedIn with uBlock Origin that LinkedIn won't let you block
# Choose "Options" in uBlock Origin with a right-click, and add these to
# "My filters"
# ADDING YOUR OWN FILTERS
#
# Using Linkedin.com as an example
#
# 1. Open up the webpage
# 2. Find some text you want to block
@TomHarrop
TomHarrop / gist:70ca5b94315d9141198b
Created April 26, 2015 15:49
freenas 9.3 forked-daapd install with slightly modified install script from https://github.com/ejurgensen/forked-daapd/blob/master/scripts/freebsd_install_10.1.sh
#!/bin/sh
# Credit thorsteneckel who made the how-to that is the basis for this
# script, see https://gist.github.com/thorsteneckel/c0610fb415c8d0486bce
echo "This script will install forked-daapd in FreeBSD 10.1. The script is not"
echo "very polished, so you might want to look through it before running it."
read -p "Continue? [y/N] " yn
if [ "$yn" != "y" ]; then
exit
fi
@TheMightyLlama
TheMightyLlama / jira-curl.sh
Last active November 16, 2023 18:22
Perform actions on a jira issue via curl
#Creates a new issue with custom fields
curl -D- -u uname:pass -X POST --data "{\"fields\": {\"project\": { \"id\": \"10430\" },\"summary\": \"This is a test issue\", \"description\": \"Description\",\"issuetype\": { \"id\" : \"1\"}, \"components\" : [{\"id\":\"10731\"}], \"customfield_10711\" : [{\"id\":\"10500\"}] } }" -H "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/issue/
#Returns all information for all versions
curl -D- -u uname:pass -X PUT -d "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/project/AN/versions?
#Returns all issues in a version
#This URL requires the version ID of a single version which is provided by the above query
curl -D- -u uname:pass -X PUT -d "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/search?jql=project="AN"+AND+fixVersion='12345'
@hubgit
hubgit / README.md
Last active December 16, 2023 14:09
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git