Skip to content

Instantly share code, notes, and snippets.

@Raniz85
Raniz85 / mkpassphrase
Last active February 7, 2024 09:04
Short Python script to generate a passphrase with capitals, numbers and special characters using aspell as the source for the wordlist. Perfect for generating rememberable passwords that also pass common password requirements. Make sure you have aspell and at least one dictionary installed and change the default language on row 18 as you see fit.
#!/usr/bin/python3
import subprocess
import secrets
import argparse
parser = argparse.ArgumentParser(
description="Generate a passphrase.\n"
"The phrase will consist of a configurable number of words separated by numbers or special characters. One of the "
"words will be capitalized."
@Raniz85
Raniz85 / zwift-launcher
Last active December 23, 2024 10:35
Script for launching Zwift installed with Lutris. Put your password in ~/.zwiftpassword and it will be placed in the clipboard once the game has been started
#!/bin/bash
cd ~/Games/zwift
# Where you installed Zwift
zwiftLocation="$HOME/Games/zwift"
# The ID in Lutris of Zwift
lutrisGameId=1
startLauncher() {
@Raniz85
Raniz85 / build.gradle
Created September 20, 2017 07:41
Example build.gradle that uses the Java plugin and Gradle 4.1
plugins {
id "java"
}
wrapper {
gradleVersion = "4.1"
}
@Raniz85
Raniz85 / ffbe-ariana
Last active January 19, 2017 10:28
Simple Python script for grinding Dangerous Woman Tour - Main Hall FFBE. Requires Python 3 and ADB. Don't forget to enable debug mode on your device. Future improvements is to determine state from screenshots instead of waiting a specific time and support completion of the daily quest. USE AT YOUR OWN RISK!
#!/usr/bin/env python3
# Copyright 2017 Raniz
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@Raniz85
Raniz85 / ffbe-tmr
Last active April 7, 2017 06:53
Simple Python script for grinding Trust Master Rewards in FFBE. Requires Python 3 and ADB. Don't forget to enable debug mode on your device. Future improvements is to determine state from screenshots instead of waiting a specific time and support completion of the daily quest. USE AT YOUR OWN RISK!
#!/usr/bin/env python3
# Copyright 2017 Raniz
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#!/usr/bin/env python3
# -*- encoding: utf8 -*-
import sys
try:
import boto3
import tzlocal
except ImportError:
print("This script requires boto3 and tzlocal. Please make sure both are installed")
#!/usr/bin/env python3
# Simple script for mirroring a directory to all plugged in USB drives using Rsync in parallell
import math
import os
import subprocess
import time
class Drive: