Skip to content

Instantly share code, notes, and snippets.

@bones-ai
bones-ai / main.odin
Created September 25, 2024 14:16
A small fps written in Odin and raylib
package main
import "core:fmt"
import "core:math"
import "core:math/linalg"
import "core:math/rand"
import "core:slice"
import rl "vendor:raylib"
// MARK: Consts
@jakubtomsu
jakubtomsu / ease.odin
Last active February 7, 2025 23:13
Easings library ported to Odin
package ease
// Adapted from functions here: https://github.com/warrenm/AHEasing/blob/master/AHEasing/easing.c
// For previews go here: https://easings.net/
import "core:math"
Mode :: enum {
linear = 0,
quad_in,
@ahives
ahives / LINQ to HL7 Machete example
Created August 19, 2018 16:02
Getting started in Machete using LINQ to HL7
# Step 1: Initialize your parser and formatter
# The code that initializes the parser and formatter should be called only once
var schema = Machete.Schema.Factory.CreateHL7<HL7Entity>(x => x.AddFromNamespaceContaining<MSH>());
var parser = Machete.Parser.Factory.CreateHL7(schema);
# Step 2: Parse the message
# calling the below method does not actually parse the data yet since you have not defined what example you want to parse yet
# this call will analyze the message and do some pre-parsing
var parse = parser.Parse(message);
@jemshit
jemshit / proguard-rules.pro
Last active December 28, 2025 03:45
Proguard Rules for Android libraries
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9)
-keep class rx.schedulers.Schedulers {
public static <methods>;
@espeed
espeed / bulbs_titan_example.py
Last active May 28, 2016 01:55
Bulbs/Titan Example
# by James Thornton, http://jamesthornton.com
from bulbs.titan import Graph, DEBUG
# TITAN_URI => "http://localhost:8182/graphs/graph"
# "graph" is the default graph name set in the Titan Server config
g = Graph()
g.config.set_logger(DEBUG)
@rsleggett
rsleggett / NinjectDependencyResolver.cs
Created October 22, 2012 21:27
Here's a ninject dependency resolver
namespace DD4T.Web.Mvc.Ninject
{
///<summary>
/// NinjectDependencyResolver
/// 2012-10-22
/// Author: Robert Stevenson-Leggett
///</summary>
public class NinjectDependencyResolver : IDependencyResolver
{
private readonly IKernel _kernel;
@amorton
amorton / .gitignore
Created August 19, 2012 10:27
Sorting lists for humans with Cassandra
*.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
@romannurik
romannurik / button_bar_layout.xml
Created April 10, 2012 04:24
How to make a proper button bar on ICS
<!--
A button bar is a set of buttons at the bottom of an activity.
An example is an AlertDialog with OK/Cancel buttons.
Note that something similar can be accomplished using a
split action bar and text-only action buttons, but this is an
alternate presentation that's often preferred.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
@smukkejohan
smukkejohan / nagios
Created February 6, 2012 19:07
Nagios with Nginx configuration
server {
listen 80;
server_name nagios.example.tld;
access_log /var/log/nginx/nagios.access.log;
error_log /var/log/nginx/nagios.error.log info;
expires 31d;
root /usr/share/nagios3/htdocs;
@amorton
amorton / reverse_query_profile.py
Created October 3, 2011 08:43
reverse_query_profile.py
#!/usr/bin/env python
"""Tool for profiling Cassandra query performance using reverse comparators.
Tests are run by profile() multiple times and the 'Read Latency' is
extracted using node tool.
Usage:
#Create the schema using the cassandra-cli.