- Unlock bootloader
sudo fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
(stock or google)sudo fastboot erase system
sudo fastboot flash system Gsi.img
- If you have an error in step 5 "not enough space to resize partition":
sudo fastboot delete-logical-partition product_b
(if fastboot getvar all "current-slot" is a, run:sudo fastboot delete-logical-partition product_a
- https://www.droidwin.com/fix-failed-remote-not-enough-space-to-resize-partition/)
Discover gists
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Windows.Forms; | |
using Microsoft.Win32; | |
namespace RunOnStartup | |
{ | |
/// <summary> | |
/// It attempts to write to HKEY_LOCAL_MACHINE first, which will run on startup on all user accounts. |
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.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
You'd like a docker container that runs cron jobs, with the output of those cron jobs going to stdout so they are accessible as docker logs. How do you do that?
In your Dockerfile, apt-get -y install cron
Use apk or whatever if you are running on alpine or another distribution
Set the command or entrypoint in your Dockerfile to run cron 9n the foreground
ENTRYPOINT ["/usr/sbin/cron", "-f"]
## Option 1 - This can be used to be prompted for credentials | |
$UserCredential = Get-Credential | |
## Option 2 - If you really want to automate the script, you will | |
## want to hard code the credentials to log into Azure AD. | |
# $User = "<ADMIN USER>" | |
# $PWord = ConvertTo-SecureString -String "<PASSWORD>" -AsPlainText -Force | |
# $UserCredential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PWord | |
## Create the session to Exchange Online |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files
## Option 1 - This can be used to be prompted for credentials | |
$UserCredential = Get-Credential | |
## Option 2 - If you really want to automate the script, you will | |
## want to hard code the credentials to log into Azure AD. | |
# $User = "<ADMIN USER>" | |
# $PWord = ConvertTo-SecureString -String "<PASSWORD>" -AsPlainText -Force | |
# $UserCredential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PWord | |
## Create the session to Exchange Online |
d3* | |
data | |
*.swp |
#!/bin/sh | |
## | |
# This script contains helper for sha256 validating your downloads | |
# | |
# Source: https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1 | |
# Author: Onni Hakala | |
# License: MIT | |
## | |
# Stop program and give error message |