Skip to content

Instantly share code, notes, and snippets.

// Name: tmux sesh
// Description: Opens a tmux session
import '@johnlindquist/kit';
const sessionsCmd = await $`tmux list-sessions`;
let sessions = sessionsCmd.stdout;
sessions = sessions
.split('\n')
@nikolovlazar
nikolovlazar / dotfiles-install.sh
Last active June 16, 2023 01:14
Dotfiles installation script
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
git clone --bare https://github.com/nikolovlazar/dotfiles.git $HOME/.dotfiles
function dotfiles {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}
mkdir -p .config-backup
@nikolovlazar
nikolovlazar / popover-anatomy-illustration.tsx
Created December 30, 2022 12:15
The Popover Anatomy illustration
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 298 216'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='298' height='216' fill='white' />
<path
@nikolovlazar
nikolovlazar / Modal.kt
Created November 21, 2022 12:24
An example Modal UI built with Jetpack Compose.
@Composable
fun Modal() {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.padding(40.dp),
) {
Icon(
Icons.Filled.Email,
"icon",
tint = Color(52, 120, 246), // similar to the iOS one
@nikolovlazar
nikolovlazar / Modal.swift
Created November 21, 2022 12:21
An example Modal UI built with SwiftUI.
//: An example Modal UI built with SwiftUI
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State private var emailAddress = ""
var body: some View {
VStack(spacing: 16) {
Image(systemName: "envelope.fill")
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 384 216'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='384' height='216' fill='white' />
<rect x='140' y='92' width='87' height='32' rx='6' fill='#319795' />
@nikolovlazar
nikolovlazar / alert-anatomy-illustration.tsx
Created October 23, 2022 08:11
Alert anatomy illustration
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 480 270'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='480' height='270' fill='white' />
<path
@nikolovlazar
nikolovlazar / stat-anatomy.tsx
Created October 17, 2022 10:44
Stat anatomy illustration
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 480 270'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='480' height='270' fill='white' />
<path
@nikolovlazar
nikolovlazar / switch-anatomy.tsx
Created October 17, 2022 10:10
Switch anatomy illustration
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 480 270'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='480' height='270' fill='white' />
<rect x='172' y='97' width='136' height='76' rx='38' fill='#3182CE' />
@nikolovlazar
nikolovlazar / accordion-anatomy.tsx
Last active October 17, 2022 09:58
Accordion component anatomy illustration
<AspectRatio ratio={16 / 9}>
<svg
width='100%'
height='100%'
viewBox='0 0 480 270'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='480' height='270' fill='white' />
<path