Skip to content

Instantly share code, notes, and snippets.

@Tetralux
Tetralux / vcvarsall.bat
Created January 11, 2022 03:01
A simpler wrapper for vcvarsall.bat which only does the work on the first run
@echo off
:: Path to vcvarsall.bat from Visual Studio
:: When called, it makes cl.exe (C++ compiler) and link.exe (Linker) available in PATH.
set VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat"
if "%VSISSET%"=="" (
%VCVARSPATH% %*
if "%ERRORLEVEL%"=="0" (
set VSISSET=%*
@Tetralux
Tetralux / base64.odin
Last active August 3, 2019 15:52
Quick and dirty base64 implemention in Odin
/*
A simple base64 encoder/decoder.
Written by Tetralux@github.
Created December 2018.
*/
package base64;
using import "core:fmt";
@Tetralux
Tetralux / odin.bat
Last active June 11, 2023 15:56
A helper for compiling code with Odin on Windows
@ECHO OFF
:: Path to Odin executable
SET ODINPATH="C:\odin\odin.exe"
:: Path to the Microsoft 'vcvarsall.bat' file.
:: This sets the required environment vars and makes cl.exe and link.exe available in PATH.
SET VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat"
:: Only run the MSVC batch file the first time we
@Tetralux
Tetralux / julia-loadimage.sh
Last active February 24, 2017 22:58
A simple script to safely load a back-up of the Julia sys.dll and libjulia.dll.
#!/bin/bash
# Moves libjulia.$NAME.dll and sys.$NAME.dll back into place. (See julia-saveimage.sh.)
# If the files already exist, prompts before overwriting.
#
# Usage: ./julia-loadimage.sh <name>
LIB=usr/lib/julia
BIN=usr/bin
ABORT=0
@Tetralux
Tetralux / julia-saveimage.sh
Last active February 24, 2017 22:59
A simple script to safely back-up the Julia sys.dll and libjulia.dll, and give it a name.
#!/bin/bash
# Moves the sys.dll and libjulia.dll files into sys.$NAME.dll and libjulia.$NAME.dll in their respective directories.
# (See julia-loadimage.sh.)
# If the files already exists, prompts before overwriting.
#
# Usage: ./julia-saveimage.sh <name>
ABORT=0
LIB=usr/lib/julia