Skip to content

Instantly share code, notes, and snippets.

View roziscoding's full-sized avatar
🏳️‍🌈

Roz roziscoding

🏳️‍🌈
View GitHub Profile

Keybase proof

I hereby claim:

  • I am rjmunhoz on github.
  • I am rjmunhoz (https://keybase.io/rjmunhoz) on keybase.
  • I have a public key ASDarSAtuZhNxewvU7V_X4WzEErg-49yv_9r_xsMAeI_LQo

To claim this, I am signing this object:

@roziscoding
roziscoding / convert.ts
Created March 12, 2019 20:00
Unit converting with pure functions and a factory
export const fromCToK = (value: number) => value * 1.8 + 32
export const fromCToF = (value: number) => value + 273.15
export const fromFToC = (value: number) => (value - 32) / 1.8
export const fromFToK = (value: number) => fromFToK(value) + 273.15
export const fromKToC = (value: number) => value - 273.15
export const fromKToF = (value: number) => (value * 1.8) - 459.67
export const convert = (value: number) => ({

Keybase proof

I hereby claim:

  • I am roziscoding on github.
  • I am roziscoding (https://keybase.io/roziscoding) on keybase.
  • I have a public key whose fingerprint is 6C59 D01E 490C B533 6D3A A070 C60E 898E 61D6 AE2F

To claim this, I am signing this object:

" Disable compatibility with vi which can cause unexpected issues.
set nocompatible
" Enable type file detection. Vim will be able to try to detect the type of file in use.
filetype on
" Enable plugins and load plugin for the detected file type.
filetype plugin on
" Load an indent file for the detected file type.
filetype indent on
" Enable syntax highlighting
syntax enable
@roziscoding
roziscoding / .preview
Last active July 3, 2023 13:54
WSL/ubuntu dotfiles
#! /usr/bin/env zsh
realpath=${1:-$2}
batcommand=$(if type batcat > /dev/null; then echo 'batcat'; else echo 'bat'; fi)
if [[ ! -r $realpath ]]; then
where $realpath;
elif [[ -d $realpath ]]; then
exa -1 -lah --git --icons --color=always --octal-permissions --no-time --no-permissions --group-directories-first -s name $realpath;
elif [[ $realpath:t:e = "png" || $realpath:t:e = "jpg" ]]; then
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = false
username.show_always = true
format = """
$os\
$hostname\
$localip\
#!/usr/bin/env bash
# This script defines just a mode for rofi instead of being a self-contained
# executable that launches rofi by itself. This makes it more flexible than
# running rofi inside this script as now the user can call rofi as one pleases.
# For instance:
#
# rofi -show powermenu -modi powermenu:./rofi-power-menu
#
# See README.md for more information.