Skip to content

Instantly share code, notes, and snippets.

View jarulsamy's full-sized avatar
🦀

Joshua Arulsamy jarulsamy

🦀
View GitHub Profile
@jarulsamy
jarulsamy / livecam.py
Created March 27, 2018 03:43
Always running script on a Raspberry pi to create a webserver with the Camera
import io
import picamera
import logging
import socketserver
from threading import Condition
from http import server
PAGE="""\
<html>
<head>
@jarulsamy
jarulsamy / install.bat
Created May 14, 2018 13:49
Custom install script for myro and prereq
cd /d %0\..
msiexec /i python-2.4.4.msi
pyserial-2.2.win32.exe
IF NOT EXIST %SystemRoot%\System32\mfc71.dll copy /Y mfc71.dll %SystemRoot%\System32\
myro-2.9.5.win32.exe
copy /Y snack\tkSnack.py c:\Python24\Lib\
copy /Y misc\config-extensions.def c:\Python24\Lib\idlelib\
copy /Y misc\ScriptBinding.py c:\Python24\Lib\idlelib\
pause
@jarulsamy
jarulsamy / scribbler.py
Created December 10, 2018 03:48
Essential movement portions of scribbler2 robot ported to python3.
import time
import serial
import threading
from past.utils import old_div
class commands(object):
SOFT_RESET = 33
GET_ALL = 65
GET_ALL_BINARY = 66
GET_LIGHT_LEFT = 67
@jarulsamy
jarulsamy / autoexec.cfg
Last active December 25, 2019 06:18
Custom Auto Exec for CSGO
// Joshua Arulsamy
// CS:GO config
// Updated 11/29/2019
// Crosshair
cl_crosshaircolor 3
cl_fixedcrosshairgap -2.5
cl_crosshairstyle 1
hud_showtargetid 1
@jarulsamy
jarulsamy / makefile
Created September 30, 2019 15:26
Sample Makefile for C++
# 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)
#
# 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 / terraria-backup.py
Created January 3, 2020 15:47
A Python script to compress and upload terraria server worlds to google drive.
#!/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)
@jarulsamy
jarulsamy / cloudSettings
Created July 20, 2020 03:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-20T03:06:02.042Z","extensionVersion":"v3.4.3"}
@jarulsamy
jarulsamy / RebootLinux.bat
Last active June 23, 2022 20:21
Reboot to Linux From Windows
:: _Sigh_ Windows dumbness...
powershell .\RebootLinux.ps1
@jarulsamy
jarulsamy / backup.sh
Last active February 22, 2024 18:21
Linux backup home directory daily.
#!/usr/bin/env bash
#
# Backup home directory
#
#
set -o errexit
set -o nounset
set -o pipefail