Skip to content

Instantly share code, notes, and snippets.

View patrikalienus's full-sized avatar

Patrik Alienus patrikalienus

View GitHub Profile
@patrikalienus
patrikalienus / pwdgen.py
Last active April 8, 2024 12:23
Random password generator
#!/usr/bin/python3
# Learning python project.
# I bet there are better ways of doing things than this, but it works well, especially paired with a workflow in Alfred.
# -c, --chars Number of characters to use
# -r, --range Amount of passwords to generate
import sys
import getopt
@patrikalienus
patrikalienus / tiktok-domains
Last active August 28, 2022 17:18
TikTok's domains. In case you want to block them all like I do.
# TikTok block list
0.0.0.0 abtest-sg-tiktok.byteoversea.com
0.0.0.0 abtest-va-tiktok.byteoversea.com
0.0.0.0 gts.byteoversea.net
0.0.0.0 isnssdk.com
0.0.0.0 lf1-ttcdn-tos.pstatp.com
0.0.0.0 muscdn.com
0.0.0.0 musemuse.cn
0.0.0.0 musical.ly
@patrikalienus
patrikalienus / upload_ssh_keys.sh
Created May 16, 2021 19:35
SSH Key upload script for Bash
#!/usr/bin/env bash
# Upload SSH keys to server
function upload_ssh_keys () {
if [ "$1" != "" ]
then
host=$1
port=`echo -n $host | cut -d: -f 2`
host=`echo -n $host | cut -d: -f 1`
@patrikalienus
patrikalienus / r_pages.11tydata.js
Last active April 19, 2021 14:36
Pages in 11ty from consumed GraphCMS data with localization
require("dotenv").config(); // Store of GCMS_ENDPOINT and GCMS_TOKEN
const { gql } = require("graphql-request");
const { GraphQLClient } = require("graphql-request");
const client = new GraphQLClient(process.env.GCMS_ENDPOINT);
const requestHeaders = {
authorization: "Bearer " + process.env.GCMS_TOKEN,
};
###
# Feel free to use if it helps.
# Forked from all over the place.
###
###############################################################################
# INPUT PLUGINS #
###############################################################################
## ------------------------------------------- ##
0.0.0.0 secure.norm0care.com
0.0.0.0 secure.1-cl0ud.com
0.0.0.0 secure.aiea6gaza.com
0.0.0.0 secure.alda1mure.com
0.0.0.0 secure.alea6badb.com
0.0.0.0 secure.alga9frog.com
0.0.0.0 secure.amos5lynn.com
0.0.0.0 secure.aran9midi.com
0.0.0.0 secure.arid5glop.com
0.0.0.0 secure.badb5refl.com
#!/bin/bash
# <bitbar.title>alienus-external-ip</bitbar.title>
# <bitbar.desc>Gets your current external IP address. Uses ipify.org public API to do so.</bitbar.desc>
# <bitbar.author>Patrik Alienus</bitbar.author>
# <bitbar.author.github>patrikalienus</bitbar.author.github>
# Forked from https://github.com/matryer/bitbar-plugins/blob/master/Network/external-ip.1h.sh
# which does not work with VPNs, but this one does because it's uing the ipify.org API instead of a dig.
# Also changed slightly in the output to suit my minimalist tastes.

Keybase proof

I hereby claim:

  • I am patrikalienus on github.
  • I am patrikalienus (https://keybase.io/patrikalienus) on keybase.
  • I have a public key whose fingerprint is 86E0 75B7 E252 862B 63F8 CC0F 9B96 7D85 19A7 82BF

To claim this, I am signing this object: