Skip to content

Instantly share code, notes, and snippets.

Avatar
🦀

Joshua Arulsamy jarulsamy

🦀
  • University of Wyoming
  • Laramie WY
View GitHub Profile
@jarulsamy
jarulsamy / flash.sh
Created Jan 19, 2023
Instructions for flashing the Nvidia Jetson Xavier AGX
View flash.sh
#!/usr/bin/env bash
#
# Flashing the Nvidia Jetson Xavier NGX
# Good luck, Nvidia - as usual - did not make this easy for anyone.
# (this is a massive pain on non-ubuntu hosts).
#
# 1. Install these packages
#
# $ sudo pacman -S qemu-user-static qemu-user-binfmt
#
View Cal.py
#!/usr/bin/env python3
"""
Convert malformed calendar entries into Org-Agenda TODO items.
Usage:
1. Export Canvas calendar to Google Calendar.
2. Export Google Calendar to ICS.
3. Load ICS into Emacs iCal.
4. Pipe contents of Emacs iCal schedule into this script. (cat school_schedule.org | ./cal.py > physics.org)
5. Profit?
@jarulsamy
jarulsamy / powder_plot.py
Created Nov 23, 2022
Plot powder diffraction data directly to an Excel document.
View powder_plot.py
"""
MIT License
Copyright (c) 2022 Joshua Arulsamy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View get_gh_repos.py
#!/usr/bin/env python3
"""Get all the Github repositories for the currently authenticated gh-cli user."""
import json
import os
import subprocess
from pathlib import Path
from typing import Union
import requests
@jarulsamy
jarulsamy / backup.sh
Last active Jul 29, 2022
Linux backup home directory daily.
View backup.sh
#!/usr/bin/env bash
#
# Backup home directory
#
#
set -o errexit
set -o nounset
set -o pipefail
@jarulsamy
jarulsamy / RebootLinux.bat
Last active Jun 23, 2022
Reboot to Linux From Windows
View RebootLinux.bat
:: _Sigh_ Windows dumbness...
powershell .\RebootLinux.ps1
@jarulsamy
jarulsamy / cloudSettings
Created Jul 20, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-07-20T03:06:02.042Z","extensionVersion":"v3.4.3"}
@jarulsamy
jarulsamy / terraria-backup.py
Created Jan 3, 2020
A Python script to compress and upload terraria server worlds to google drive.
View terraria-backup.py
#!/usr/bin/python3
import enum
import logging
import subprocess
import time
import os
logging.basicConfig(filename="/home/terraria/terraria-backup.log", filemode="a",
format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.DEBUG)
View smb.conf
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
@jarulsamy
jarulsamy / makefile
Created Sep 30, 2019
Sample Makefile for C++
View makefile
# the compiler: gcc for C program, define as g++ for C++
CC = g++
CFLAGS = -g -Wall
# the build target executable:
TARGET = `NAME_OF_MAIN_FILE`
all: $(TARGET)