Skip to content

Instantly share code, notes, and snippets.

View ariscript's full-sized avatar

Ari Prakash ariscript

View GitHub Profile
@ariscript
ariscript / amd64-ova-m1.md
Created October 7, 2024 22:03
Running x86_64 .ova VMs on Apple Silicon

Running a x86_64 .ova VM on an Apple Silicon Mac

Run tar -xvf file.ova in the directory of your file, and it wil be extracted to a few different files. The only one we need is the .vmdk.

Dependencies

brew install qemu utm
@ariscript
ariscript / .p10k.zsh
Last active January 10, 2024 21:06
powerlevel10k config
# Generated by Powerlevel10k configuration wizard on 2023-03-12 at 18:09 EDT.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 53788.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
# 2 lines, disconnected, left frame, lightest-ornaments, sparse, many icons, fluent,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
@ariscript
ariscript / .zshrc
Last active February 8, 2024 04:54
Mac zsh config
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export PATH=$HOME/bin:$HOME/.emacs.d/bin:$PATH:$HOME/Library/Python/3.9/bin:$HOME/.spicetify
launchctl setenv PATH $PATH
@ariscript
ariscript / .zshrc
Last active March 12, 2023 20:13
[old] Windows .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@ariscript
ariscript / .starship.toml
Last active October 15, 2022 02:27
Starship prompt configuration
add_newline = true
command_timeout = 5000
# basically hacking right prompt on the same line as the other info
# instead of at the end of the line with the prompt
format = "$username$hostname$singularity$directory$vcsh$git_branch$git_commit$git_state$git_metrics$git_status$docker_context$package$cmake$dart$deno$dotnet$elixir$elm$erlang$golang$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$python$rlang$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$fill$sudo$cmd_duration$jobs$status$time$line_break$character"
[username]
show_always = true
style_root = "bold red"
style_user = "cyan"
@ariscript
ariscript / .poshtheme.omp.json
Last active April 20, 2022 02:14
Oh-my-posh prompt configuration
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": false,
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#45F1C2",
"properties": {
@ariscript
ariscript / Command Handlers.md
Last active July 30, 2021 21:06
Good Discord bot Command Handlers

Command Handlers

This gist will present some of the best command handlers to use for making a bot using discord,js.

The reason I include my own handler here is that it is indeed one of the best options to use to make a Discord bot. It has many configuration options that allow you to extend and override many of its default behaviors, middleware (a la express), and TS typings (it was made to work in TS more than JS). One con of this handler may be that it has a rather large bundle size. It even includes type checking and provides parsed types of arguments!

@ariscript
ariscript / [...nextauth].ts
Created April 12, 2021 12:53
Discord "identify guilds" NextAuth.js implementation
import NextAuth from "next-auth";
import Providers from "next-auth/providers";
export default NextAuth({
session: {
jwt: true,
},
callbacks: {
jwt: async (token, user, account, profile) => {