Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 17:14
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
// parseTileLevel at the beginning
// genPath kinda often
// orient frequently
function parseTileLevel() {
// put this in a more central place?
// parse tile level into graph
graph = new Graph();
final lvl = CharVars.get().tileLevel;
// Sample code showing how to create a modern OpenGL window and rendering
// context on Win32, using Odin.
//
// Ported from https://gist.github.com/nickrolfe/1127313ed1dbf80254b614a721b3ee9c
package main
import "core:sys/windows"
import "core:strings"
import "core:fmt"
@oskarnp
oskarnp / bit_set_iterator.odin
Created February 11, 2024 08:29
bit_set_iterator.odin
package main
import "core:fmt"
import "base:intrinsics"
main :: proc() {
X :: enum { A, B, C }
Y :: bit_set[X];
values := Y{.A, .C};
@oskarnp
oskarnp / Odin.sublime-build
Last active May 9, 2024 17:11
Sublime build system for Odin
{
"selector":"source.odin",
"file_regex": "^(.+)\\(([0-9]+):([0-9]+)\\) (.+)$",
"shell_cmd":"odin check \"$file_path\" -no-entry-point",
"variants":[
//
// current file
//
// syntax check
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import java.lang.reflect.Method;
// MIUI. Redefining Android.
@oskarnp
oskarnp / tracking_allocator.odin
Last active May 9, 2024 17:10
Odin tracking allocator
package main
import "core:fmt"
import "core:mem"
import "core:log"
import "core:runtime"
// NOTE(Oskar): An example of how to do a leak checking allocator with Odin's context system.
//
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active May 9, 2024 17:09
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018