Skip to content

Instantly share code, notes, and snippets.

@mrts
mrts / markdown-to-slack.py
Last active May 6, 2024 15:49
Markdown to Slack
# Translates Markdown syntax to Slack, replaces:
#
# - hyphened lists with bullet symbols
# - double bold marker asterisks `**` with single asterisk `*`
# - headers `#` with bold marker asterisks `*`
#
# Run with
#
# python markdown-to-slack.py filename.md
#
@trandaison
trandaison / starUML.md
Last active May 6, 2024 15:48
Get full version of StarUML
  • repo -> repository

  • clone -> bring a repo down from the internet (remote repository like Github) to your local machine

  • add -> track your files and changes with Git

  • commit -> save your changes into Git

  • push -> push your changes to your remote repo on Github (or another website)

  • pull -> pull changes down from the remote repo to your local machine

  • status -> check to see which files are being tracked or need to be commited

  • init -> use this command inside of your project to turn it into a Git repository and start using Git with that codebase

sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
scope="playlist-modify-private",
redirect_uri="http://example.com",
client_id=YOUR UNIQUE CLIENT ID,
client_secret= YOUR UNIQUE CLIENT SECRET,
show_dialog=True,
cache_path="token.txt"
)
)
@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.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня