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
#!/bin/bash | |
# | |
# replace `GITHUBTOKEN` with custom token from https://github.com/settings/tokens, having `repo` admin access | |
# | |
for repo in $(curl -s -H "Authorization: token GITHUBTOKEN" 'https://api.github.com/orgs/TYPO3-CMS/repos?per_page=100' | jq -r '.[] | .url' | sort) | |
do | |
echo "Renaming ${repo}..." | |
response=$(curl -s -X POST \ |
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
-- started based on https://gist.github.com/z4yx/218116240e2759759b239d16fed787ca | |
cbor = Dissector.get("cbor") | |
iso7816 = Dissector.get("iso7816") | |
ctaphid_proto = Proto("CTAPHID","FIDO Client to Authenticator Protocol over USB HID") | |
ctaphidfield_cid = ProtoField.uint32("ctaphid.cid", "Channel ID", base.HEX) | |
ctaphidfield_cmd = ProtoField.uint8("ctaphid.cmd", "Command", base.HEX) | |
ctaphidfield_bcnt = ProtoField.uint16("ctaphid.bcnt", "Payload Length", base.DEC_HEX) | |
ctaphidfield_seq = ProtoField.uint8("ctaphid.seq", "Packet Sequence", base.HEX) |
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
Enable DCI debugging on Gigabyte-BKi5HA-7200 | |
-------------------------------------------- | |
The Gigabyte-BKi5HA-7200 (Kabylake i5-7200 processor) can be debugged with only a USB debug cable, a | |
special cable that crosses only the data signals and has the power signals | |
removed. You can buy these cables at i.e. https://www.datapro.net/products/usb-3-0-super-speed-a-a-debugging-cable.html | |
The hurdle you have to overcome before you can access DCI however is that you | |
need to set some bits in hardware that first enable DCI and also enable the debug port so that DCI can control the cores. | |
There are lots of guides in howto patch the BIOS but only these two really describes all the steps using only freely accessible tools: |
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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
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
public static class Blur { | |
private static final float BLUR_RADIUS = 20.5f; // 25 is maximum radius | |
// returns blur drawable if api >= 17. returns original drawable if not. | |
@Nullable | |
public static Drawable applyBlur(Drawable drawable, Context context) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { | |
Bitmap fromDrawable = drawableToBitmap(drawable); | |
int width = Math.round(fromDrawable.getWidth() * 0.8f); |
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
# ---------------------------------- | |
# Colors | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' |
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
pdftk original.pdf output uncompressed.pdf uncompress | |
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
pdftk stripped.pdf output final.pdf compress |