Convert a Nova Launcher backup to a Lawnchair backup.
- Home screen layout (all pages)
- Dock (hotseat) icons and their positions
- Folders and their contents
- Widgets (provider/size/position — widget IDs are reset and must be re-bound on device)
| directory = '/path/to/photos' | |
| output_directory = '/path/to/output_directory' | |
| bin_directory = '/path/to/trash_directory' | |
| import json | |
| import os | |
| import shutil | |
| from datetime import datetime |
| import kotlinx.serialization.* | |
| import kotlinx.serialization.descriptors.SerialDescriptor | |
| import kotlinx.serialization.encoding.CompositeDecoder | |
| import kotlinx.serialization.encoding.Decoder | |
| import kotlinx.serialization.encoding.Encoder | |
| import kotlinx.serialization.json.* | |
| import kotlin.reflect.KType | |
| import kotlin.reflect.full.isSubtypeOf | |
| import kotlin.reflect.full.starProjectedType |
| fun encrypt(context:Context, strToEncrypt: String): ByteArray { | |
| val plainText = strToEncrypt.toByteArray(Charsets.UTF_8) | |
| val keygen = KeyGenerator.getInstance("AES") | |
| keygen.init(256) | |
| val key = keygen.generateKey() | |
| saveSecretKey(context, key) | |
| val cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING") | |
| cipher.init(Cipher.ENCRYPT_MODE, key) | |
| val cipherText = cipher.doFinal(plainText) |
| #!/usr/bin/env bash | |
| cd ~/ | |
| mkdir -p ~/.local/bin | |
| wget "https://discordapp.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz | |
| tar -xvf discord.tar.gz -C ~/.local/bin | |
| sudo ln -s ~/.local/bin/DiscordCanary/discord.png /usr/share/icons/discord.png | |
| sudo ln -s ~/.local/bin/DiscordCanary/DiscordCanary /usr/bin | |
| wget https://gist.githubusercontent.com/AdrianKoshka/a12ca0bfe2f334a9f208aff72f8738c3/raw/9d606ad7ce7cc1dd23f6a99993e2396540538a02/discord.desktop -O discord.desktop | |
| mkdir -p ~/.local/share/applications/ | |
| mv ~/discord.desktop ~/.local/share/applications/ |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config to:
| #!/usr/bin/env python3 | |
| """ | |
| Clone all public and private repositories from a specific GitHub user or organization. | |
| Uses only the Python standard library (no pip dependencies required). | |
| Usage: github-clone-all [-h] [--org] [--token TOKEN] [--output OUTPUT] [--ssh] [--dry-run] [--skip-existing] [--include PATTERN] [--exclude PATTERN] [--private-only] [--public-only] | |
| [--parallel N] [--quiet] [--verbose] [--version] | |
| target | |
| positional arguments: |