Skip to content

Instantly share code, notes, and snippets.

@erdomke
erdomke / Base32.cs
Last active April 26, 2024 12:01 — forked from BravoTango86/Base32.cs
Base32 Encoding and Decoding in C#
/*
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@inidamleader
inidamleader / AutoSizeText.kt
Last active April 26, 2024 12:01
Composable function that automatically adjusts the text size to fit within given constraints with optimal performance by using a binary search algorithm
// LAST UPDATE: 10 April 2024 v4.3:
// - Correction of updated density value in AutoSizeText function
package com.inidamleader.ovtracker.util.compose
import android.util.Log
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.BoxWithConstraintsScope
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.InternalFoundationTextApi
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active April 26, 2024 11:59
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@ssskip
ssskip / ISO3166-1.alpha2.json
Last active April 26, 2024 11:59
json of country codes (ISO 3166-1 alpha-2) and corresponding names
{
"AF": "Afghanistan",
"AX": "Aland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
@esdras-schonevald
esdras-schonevald / enum_sample.php
Created May 16, 2022 13:50
PHP ^8.1 ENUM - HOW TO USE
<?php
declare(strict_types=1);
/**
* This is a sample
* How to use Enum to create a custom exception cases
* PHP 8.1^
*/
@rampfox
rampfox / Chromium-at-startup.md
Last active April 26, 2024 11:56
How to open Chromium in full screen at startup on the Raspberry Pi

First, it seems that ~/.config/lxsession/LXDE-pi/autostart does not exist by default.

  1. copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
@thepwrtank18
thepwrtank18 / vista.md
Last active April 26, 2024 11:56
Download VMware Tools for Windows Vista (and Windows 7 RTM)

As of 12/11/2020, VMware no longer signs Tools for Windows Vista with SHA-1, so you need Windows 7 SP1 or later to use the latest version.

However, you can use an older version of VMware Tools, which is here: https://media.githubusercontent.com/media/thepwrtank18/thepwrtank18/master/VMware%20Tools%20for%20Windows%207%20RTM%20and%20Vista.iso

Link is dead. Instead, here's a full on guide.

Step 0: Foreword

This is an unsupported operating system, with unsupported drivers. Use this at your own risk.

@leocomelli
leocomelli / git.md
Last active April 26, 2024 11:56
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@karpathy
karpathy / min-char-rnn.py
Last active April 26, 2024 11:55
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@JunkFood02
JunkFood02 / Motion.kt
Last active April 26, 2024 11:53
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing