Skip to content

Instantly share code, notes, and snippets.

@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
{
"background" : "#1d2021",
"black" : "#665C54",
"blue" : "#7DAEA3",
"brightBlack" : "#928374",
"brightBlue" : "#7DAEA3",
"brightCyan" : "#89B482",
"brightGreen" : "#A9B665",
"brightPurple" : "#D3869B",
"brightRed" : "#EA6962",
---
- hosts: localhost
connection: local
name: IMPORTING SECURITY KEYS
vars:
my_key_list:
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020
@szym
szym / README.md
Last active May 10, 2024 16:04 — forked from sarg/README.md

Obtaining RK3066 boot ROM.

Here are my steps.

At first, I took a look to RK30xxLoader(L)_V1.18.bin. This file appears in update.img for my device. So, I unpacked update.img using rk29Kitchen.

strings on that file returns nothing interesting, so I assumed the file is crypted

@dansmith65
dansmith65 / Install-AWSCLIV2.ps1
Created August 23, 2022 01:33
Install version 2 of AWS CLI via PowerShell
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
@wojteklu
wojteklu / clean_code.md
Last active May 10, 2024 16:00
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@superkojiman
superkojiman / namemash.py
Last active May 10, 2024 15:59
Creating a user name list for brute force attacks.
#!/usr/bin/env python3
'''
NameMash by superkojiman
Generate a list of possible usernames from a person's first and last name.
https://blog.techorganic.com/2011/07/17/creating-a-user-name-list-for-brute-force-attacks/
'''
@Composable
fun BottomSheet(
isShown: Boolean,
modifier: Modifier = Modifier,
onDismissRequest: () -> Unit = {},
shape: Shape = BottomSheetDefaults.ExpandedShape,
sheetGesturesEnabled: Boolean = true,
dismissOnBack: Boolean = sheetGesturesEnabled,
windowInsets: WindowInsets = WindowInsets(0), // This is a nice default if the app is edge to edge
content: @Composable ColumnScope.() -> Unit,
@lopspower
lopspower / README.md
Last active May 10, 2024 15:59
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store