Skip to content

Instantly share code, notes, and snippets.

View cyb3rko's full-sized avatar

Niko Diamadis cyb3rko

View GitHub Profile
@ardakazanci
ardakazanci / ScratchEffect.kt
Created January 1, 2024 16:55
Scratch Effect - Jetpack Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
SampleUiDesignForCartTheme {
ScratchCardView()
}
}
}
@bruno-uy
bruno-uy / install_psycopg2_mac_m1.md
Last active March 19, 2024 10:10
Install psycopg2 in Mac M1

Install psycopg2 in Mac M1

Error while installing through pip install psycopg2 looks like this:

Please add the directory containing pg_config to the PATH

or specify the full executable path with the option (...)

Reference to the solution here.

@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
@BurakDizlek
BurakDizlek / CountryFlags.java
Last active January 17, 2024 01:47
Get to flag unicode as String and use it anywhere.
public class CountryFlags {
private static String A = getEmojiByUnicode(0x1F1E6);
private static String B = getEmojiByUnicode(0x1F1E7);
private static String C = getEmojiByUnicode(0x1F1E8);
private static String D = getEmojiByUnicode(0x1F1E9);
private static String E = getEmojiByUnicode(0x1F1EA);
private static String F = getEmojiByUnicode(0x1F1EB);
private static String G = getEmojiByUnicode(0x1F1EC);
private static String H = getEmojiByUnicode(0x1F1ED);
private static String I = getEmojiByUnicode(0x1F1EE);
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl

Allgemeines

Anrede: Wenig förmlich:

  • "Du"-Form
  • Keine gruseligen "Amtsdeusch"-Umschreibungen, einfach so als ob man den Nutzer direkt persönlich ansprechen würde

Genauer definiert:

  • "falsch" anstatt "nicht korrekt/inkorrekt"
  • Benutzerkonto oder Konto? Oder Account?
  • "Wende dich an ..." anstatt "kontaktiere ..."
@kcramer
kcramer / OTPTestCodes.md
Last active January 22, 2024 11:59
OTP Test Codes

OTP Test Codes

Sample OTP QR Codes

The following sample codes are not valid for the listed services but should allow basic testing of an authenticator application. Clicking on a QR code image will display just that code so it is easier to scan without interference from the other codes.

You can use this site to generate more QR codes as needed. It will also let you verify the produced codes against its own calculated code.

@angela-d
angela-d / gpg-key-migration.md
Created April 1, 2018 23:57
Move GPG Keys from One Machine to Another

Migrate GPG Keys from One Workstation to Another

Replace [your key] with your key ID

To obtain your key ID

gpg --list-secret-keys --keyid-format LONG

Which returns something like

@sgdan
sgdan / gzip.kts
Last active April 4, 2024 06:02
Kotlin code to compress/uncompress a string with gzip
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.charset.StandardCharsets.UTF_8
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
fun gzip(content: String): ByteArray {
val bos = ByteArrayOutputStream()
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) }
return bos.toByteArray()
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}