Skip to content

Instantly share code, notes, and snippets.

@StagPoint
StagPoint / Morton2D.cs
Last active May 6, 2024 15:45
Represents 2D Morton Codes by interleaving two 16-bit unsigned integer values into a 32-bit unsigned integer.
// **************************************************
// EXAMPLE USAGE:
//
// // Returns a single value with arguments x and y interleaved
// var code = MortonCode2D.Interleave( 123, 456 );
//
// // Extracts the interleaved values (123 and 456) into integer variables x and y
// MortonCode2D.Deinterleave( code, out int x, out int y )
//
// **************************************************
@ardakazanci
ardakazanci / FlipCard.kt
Created April 21, 2024 10:27
Flip Card with Jetpack Compose
@Composable
fun FlipActionScreen() {
var flippedState by remember { mutableStateOf(false) }
val rotationY by animateFloatAsState(
targetValue = if (flippedState) 180f else 0f,
animationSpec = spring(
dampingRatio = Spring.DampingRatioHighBouncy,
stiffness = Spring.StiffnessVeryLow
)
)
@ardakazanci
ardakazanci / RulerView.kt
Created April 28, 2024 06:15
RulerView - Jetpack Compose
@Composable
fun RulerView(
startValue: Int,
endValue: Int,
step: Int
) {
val density = LocalDensity.current
val scrollState = rememberScrollState()
val sectionWidth = 80.dp
var sliderValue by remember { mutableFloatStateOf(0.5f) }
@7aman
7aman / sqlite3-in-python.py
Created January 21, 2019 07:29
sqlite3 cheatsheet for python 3
#!/usr/bin/env python3
'''
Thanks to Andres Torres
Source: https://www.pythoncentral.io/introduction-to-sqlite-in-python/
'''
import sqlite3
# Create a database in RAM
@Jekins
Jekins / Markdown-docs.md
Last active May 6, 2024 15:39
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 6, 2024 15:38
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulredmond
paulredmond / docker.conf
Last active May 6, 2024 15:38
Example www pool for PHP-FPM with dynamic Environment variables
; if you're using the starter bundle file `docker/php/php-fpm.d/docker.conf`
[global]
daemonize = no
pid = run/php-fpm.pid
[www]
listen = /usr/local/var/run/php-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
@freppp
freppp / config.yml
Last active May 6, 2024 15:37
Vulcan 2.0 Configuration File Revisions
##############################################
# Vulcan Anti-Cheat Configuration File #
##############################################
# The prefix that will be used for all of the %prefix% messages throughout the plugin
prefix: '&4&lVulcan &8»'
alerts:
# This is the chat format that will be followed when a player fails a check.
# Valid placeholders are %player% (player name), %max-vl% (max violations), %check% (name of check), %description% (check description),
@ph4ge
ph4ge / sources.list
Last active May 6, 2024 15:37
Ubuntu 21.10 Impish Indri - apt sources.list
#deb cdrom:[Ubuntu 21.10 _Impish Indri_ - Release amd64 (20211012)]/ impish main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ impish main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ impish main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ impish-updates main restricted