This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
sudo apt update | |
sudo apt install -y curl fish neovim bpytop tmux fzf | |
cat <<EOF > setup.fish | |
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher | |
fisher install IlanCosman/tide@v5 | |
fisher install PatrickF1/fzf.fish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 5 ]; then | |
echo "Usage: ./create_vm_from_img.sh" | |
echo | |
echo "Example: create_vm_from_img.sh 8000 ubuntu-image focal-server-cloud.img 4096 6" | |
echo | |
echo "[MACHINE_ID]: The ID to assign the VM template" | |
echo "[TEMPLATE_NAME]: The name of the VM template" | |
echo "[IMAGE_LOCATION]: The location of the .img file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# add_drop_shadow.sh | |
# Add a drop shadow to an image matching the macOS screenshot style as close as I can | |
# | |
# Usage: add_drop_shadow.sh <image> <output> | |
# Example: add_drop_shadow.sh image.png output.png | |
# | |
# You can use the -r option to specify whether you want to replace the original image or not | |
# Example: add_drop_shadow.sh -r image.png | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
import sys | |
import time | |
import pickle | |
from datetime import datetime | |
from pathlib import Path | |
import pandas as pd | |
from dotenv import dotenv_values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate rocket; | |
use std::sync::atomic::{AtomicBool, Ordering}; | |
use std::sync::{Arc, Mutex}; | |
use std::thread; | |
use rocket::http::Status; | |
use rocket::response::status; | |
use rocket::response::status::Custom; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import SessionState | |
def display_options(session_state): | |
""" | |
Handles loading and editing of DataFrame | |
Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global _start | |
section .text | |
_start: mov rax, 1 ; system call for write | |
mov rdi, 1 ; file handle 1 is stdout | |
mov rsi, message ; address of string to output | |
mov rdx, 13 ; number of bytes of message | |
syscall ; invoke operating system to do the write | |
mov rax, 60 ; system call for exit | |
xor rdi, rdi ; exit code 0 | |
syscall ; invoke operating system to exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
char *pianoKeys[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; | |
int firstNoteIndex; | |
int secondNoteIndex; | |
int difference; | |
int getIndex(char* note) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
char *octave[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; | |
void major(char* note, int noteIndex, char *keys[]) { | |
int key1; | |
int key2; | |
if (noteIndex + 4 > 11) { | |
key1 = noteIndex - 8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lmu.cmsi281.examples; | |
public class BinaryTreeNodeString { | |
private String data; | |
private BinaryTreeNodeString left; | |
private BinaryTreeNodeString right; | |
public BinaryTreeNodeString(String element) { | |
data = element; |
NewerOlder