Skip to content

Instantly share code, notes, and snippets.

Avatar

cketti cketti

View GitHub Profile
@cketti
cketti / github_never_unread.user.js
Last active Jun 12, 2021
No unread GitHub notifications
View github_never_unread.user.js
// ==UserScript==
// @name No unread GitHub notifications
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Hide GitHub's unread notification dot in the top bar
// @author cketti
// @match https://github.com/*
// @match https://gist.github.com/*
// @icon https://github.githubassets.com/favicons/favicon.svg
// @grant GM_addStyle
@cketti
cketti / instructions.md
Created May 27, 2021
matrix-docker-ansible-deploy + signald debugging
View instructions.md
  • Clone signald fork used by matrix-docker-ansible-deploy: git clone https://mau.dev/maunium/signald.git
  • cd signald
  • Make changes to signald source code (add logging etc)
  • Build signald and create a docker image ready for use: docker build -t signald-debugging .
  • Edit /etc/systemd/system/matrix-mautrix-signal-daemon.service; replace dock.mau.dev/maunium/signald:latest with signald-debugging:latest
  • Make sure the modified service configuration is used: systemctl daemon-reload
  • Restart the signald docker container: systemctl restart matrix-mautrix-signal-daemon (this will use our signald-debugging image to create the container)
  • Hope the log contains the info you're looking for: journalctl -fu matrix-mautrix-signal-daemon
@cketti
cketti / youtube_preview.user.js
Created May 20, 2021
Element youtube preview fix (modified)
View youtube_preview.user.js
// ==UserScript==
// @name Element youtube preview
// @namespace http://tampermonkey.net/
// @version 0.3
// @description fix the embeds!!
// @author Cinnabar
// @author cketti
// @match https://app.element.io
// @match https://your.element.url.example
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@cketti
cketti / jitsi-meet-apache.conf
Created Jan 27, 2021
Jitsi Meet startWithAudioMuted/startWithVideoMuted temporary fix
View jitsi-meet-apache.conf
# …
# Allow access to /etc/jitsi/meet/start_muted.html
<Directory "/etc/jitsi/meet">
<FilesMatch "start_muted.html">
Require all granted
</FilesMatch>
</Directory>
RewriteEngine on
View InvalidateCursorPositionHack.java
private void invalidateCursorPositionHack() {
int oldStart = getSelectionStart();
int oldEnd = getSelectionEnd();
// The selection values need to actually change in order for the cursor to be redrawn. If the cursor already
// is at position 0 this won't trigger a redraw. But that's fine because the size of our span can't influence
// cursor position 0.
setSelection(0);
setSelection(oldStart, oldEnd);
View files_removed_from_zip.txt
src/tck/
src/tck/java/
src/tck/java/time/
src/tck/java/time/format/
src/tck/java/time/format/TCKFormatStyle.java
src/tck/java/time/format/TCKOffsetPrinterParser.java
src/tck/java/time/format/TCKLocalizedFieldParser.java
src/tck/java/time/format/TCKDateTimeTextPrinting.java
src/tck/java/time/format/TCKTextStyle.java
src/tck/java/time/format/TCKDateTimeFormatter.java
View android-29-sources.md

Build "Sources for Android 29" so you can comfortably browse the Android API source in Android Studio.

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@cketti
cketti / ContentUriRequestBody.kt
Created Mar 27, 2019
Implementation of OkHttp's RequestBody that supports Android's content:// URIs
View ContentUriRequestBody.kt
import android.content.ContentResolver
import android.net.Uri
import okhttp3.MediaType
import okhttp3.RequestBody
import okio.BufferedSink
import okio.Okio
import java.lang.IllegalStateException
class ContentUriRequestBody(
private val contentResolver: ContentResolver,
@cketti
cketti / android-28-sources.md
Created Aug 7, 2018
Build your own android-28 sources
View android-28-sources.md

Build "Sources for Android 28" so you can comfortably browse the Android API source in Android Studio.

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@cketti
cketti / android-27-sources.md
Created Dec 18, 2017
Build your own android-27 sources
View android-27-sources.md

Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base