Skip to content

Instantly share code, notes, and snippets.

// 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
@joepie91
joepie91 / vpn.md
Last active May 9, 2024 17:09
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@barronh
barronh / tempo_geoxo_meeting.ipynb
Last active May 9, 2024 17:09
TEMPO_GeoXO_Meeting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@madkoding
madkoding / install-docker-deepin.sh
Last active May 9, 2024 17:08
Install Docker-CE script for Deepin Linux
#!/bin/bash
echo "Starting Docker installation on Deepin Linux..."
# Define a mapping from Deepin version to Debian version
map_deepin_to_debian() {
if [ "$1" -lt 20 ]; then
echo "stretch"
elif [ "$1" -ge 20 ]; then
echo "buster"

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database