Skip to content

Instantly share code, notes, and snippets.

View horbjorn's full-sized avatar

horbjorn horbjorn

  • 02:13 (UTC +02:00)
View GitHub Profile
var randomNumbers = [42, 12, 88, 62, 63, 56, 1, 77, 88, 97, 97, 20, 45, 91, 62, 2, 15, 31, 59, 5]
func partition(v: Int[], left: Int, right: Int) -> Int {
var i = left
for j in (left + 1)..(right + 1) {
if v[j] < v[left] {
i += 1
(v[i], v[j]) = (v[j], v[i])
}
}
@horbjorn
horbjorn / gist:97933f8e0faf70626c09694f6fa1b406
Last active January 29, 2025 19:31 — forked from lucassperez/gist:bc04afa332c18ab708a084c1be1ff230
minimal zsh prompt with git colors
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '%b '
setopt PROMPT_SUBST
git_color() {
local git_status="$(git status 2> /dev/null)"
local output_styles=""
@horbjorn
horbjorn / gist:cb36d5e32b7b1310f567595acc1da615
Created October 15, 2024 07:20 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
Upload files to Google Drive using Google Apps Script Web Apps and save records in Google Sheets.
@horbjorn
horbjorn / clean-up-xiaomi-bloatware.sh
Created April 23, 2024 18:11 — forked from danpawlik/clean-up-xiaomi-bloatware.sh
Cleanup apps installed in MIUI
#!/bin/sh
#
# Clean-up Xiaomi smartphone without rooting:
#
# 1) You have to install adb tool from android sdk
# 2) You have to activate developer options, next activate usb debugging
# 3) Comment out or delete lines with packages, if you really need them
# 4) Optional: I hightly recommed to activate OEM unlocking feature in developer options.
# It doesn't unlock you device immediately, but in case of breaking you phone
# you will have opportunity to unlock you phone and reflash it via MiFlash.
@horbjorn
horbjorn / ffmpeg.md
Created April 23, 2024 18:10 — forked from dantheman213/ffmpeg.md
ffmpeg cheatsheet

ffmpeg cheatsheet

Extract video at 30 seconds in and the duration with be 5 seconds

ffmpeg -ss 00:00:30 -i orginalfile -t 00:00:05 -vcodec copy -acodec copy newfile

Add a watermark logo to the bottom right of the video offset by 30 x 30 from corner