Skip to content

Instantly share code, notes, and snippets.

View antiops's full-sized avatar

Anti Ops antiops

View GitHub Profile
@antiops
antiops / darkmode.js
Created March 7, 2021 06:16
darkmode on any site
const divs = document.querySelectorAll('*')
for (let i = 0; i < divs.length; i++){
divs[i].style.backgroundColor = 'rgb(34,34,34)'
divs[i].style.color = 'rgb(255 255 255)'
}
@antiops
antiops / readme.md
Last active August 23, 2021 16:43
Gitea: Change normal migrated repo to mirror mode

How to convert a migrated Gitea repository to a mirror

After looking around I couldn't find any place that had step by step instructions to do this. This will show you how to convert any migrated Gitea repo to a mirror repo. Only tested with gitHub repositories.

My use case: I migrated a GitHub repo and all of its issues/releases/etc with the API key option. When you create a fully cloned migration Gitea doesn't let you make it a mirror AFAIK. So you have to go digging through the Gitea database in order to change it to a mirror. And it does in fact work, you can migrate a remote repo in its entirety and thenchange it to mirror. Note: When you change to mirror, it will not mirror anything that requires an API key, it will just mirror the git repo.

For Gitea running with sqlite:

Open the Gitea database:

  • On default installations sqlite3 /opt/mailcow-dockerized/data/gitea/gitea/gitea.db
  • Or custom installation sqlite3 gitea.db in the gitea data directory wherever you installed it
@antiops
antiops / run.sh
Last active June 14, 2021 07:26
get minecraft usernames from the server user cache file
# Using tr. Removes all quotes
cat usercache.json | jq .[].name | uniq | sort | tr -d '"'
# Using sed. Only removes first & last quotes
cat usercache.json | jq .[].name | uniq | sort | sed -e 's/^"//' -e 's/"$//'
version: '3.5'
services:
thelounge:
image: thelounge/thelounge:latest
container_name: thelounge
ports:
- "127.0.0.1:9000:9000"
restart: always
volumes:
- /opt/thelounge:/var/opt/thelounge
@antiops
antiops / gov-ip.txt
Created September 17, 2021 16:27
US Government IPs
149.101.100.0/24 US Dept of Justice
149.101.101.0/24 US Dept of Justice
149.101.102.0/24 US Dept of Justice
149.101.103.0/24 US Dept of Justice
149.101.118.0/24 US Dept of Justice
149.101.164.0/23 US Dept of Justice
149.101.216.0/24 US Dept of Justice
149.101.229.0/24 US Dept of Justice
149.101.242.0/24 US Dept of Justice
153.31.0.0/17 FBI Criminal Justice Information Systems
@antiops
antiops / _gollum-notes.md
Last active October 6, 2021 03:54
Gollum Wiki Notes

My notes and snippets while working with Gollum git wiki


File Notes

custom.js Docs

  • Darkmode for gollum
  • Use Ace Github theme, it's light but inverts with the darkmode js
  • Add gutter to editor
  • Remove print margin (The annoying line in the middle of the editor, looks bad on a dark page)
  • Change tab size to 2
@antiops
antiops / gist:b0eb650e010278c9ad360d3c80a50709
Created October 22, 2021 17:32
Remove ifunny watermark
https://imageproxy.ifunny.co/crop:x-20/images/cc844dcb143a158d066ef30561bd1bf5de98b3e30a208d364f1a72b12261c950_1.jpg
@antiops
antiops / _README.md
Created December 6, 2021 14:29
paperless-ng with cloudflare argo tunnel together

Implement cloudflared directly in the paperless-ng docker-compose.yml file.

This requires you to have the cloudflared tunnel config.json & <uuid>.json already generated as well as the dns cname.

  • If you do not go follow the steps on Cloudflares docs Here and stop at step 6.

 

  1. Copy the .json files that were generated in ~/.cloudflared to your paperless-ng folder in a new folder called cloudflared

  2. Edit the config.json file and modify the credentials-file value to point to /etc/cloudflared/.json & remove the line with url

@antiops
antiops / tubi-dl.sh
Created July 30, 2022 08:19
Tubi Movie Downloader
#!/bin/bash
#####
# Requires: yt-dlp, xidel, ffmpeg, aria2c
#
# ./tubi-dl.sh LINK
#
## Output Examples:
#
# Film.Name.2022.1080p.TUBI.WEB-DL.AAC2.0.x264.mkv
@antiops
antiops / tiktok-download.ahk
Created July 31, 2022 10:32
AutoHotKey script to automatically download TikTok videos that are copied to your clipboard
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
; Requires yt-dlp
; You might need to change the '$HOME' and '$USERNAME' if they dont work
; $HOME = 'C:\Users\YourUsername'; $USERNAME is your windows username
ClipChanged(Type) {
If InStr(Clipboard, "https://www.tiktok.com/@")
Or InStr(Clipboard, "https://tiktok.com/@") {