Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
#pragma once
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders
namespace ImGui
{
inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ )
{
sudo yum -y install wget
sudo wget -O /etc/yum.repos.d/scylla.repo http://downloads.scylladb.com/rpm/centos/scylla.repo
sudo yum -y install epel-release
sudo yum -y install scylla-server scylla-jmx scylla-tools
# Set the listen_address and seed_provider seeds in scylla.yaml to the internal 10.x.x.x IP address
sudo /usr/lib/scylla/scylla_setup
@alpha123
alpha123 / ssa-interp.c
Last active June 29, 2025 23:15
Primitive SSA Bytecode Interpreter
#include <stdlib.h>
#include <stdbool.h>
#include <stddef.h>
#define _WITH_GETLINE
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include <assert.h>
@risicle
risicle / cache_chained_calculation.py
Created March 17, 2016 16:54
Django cache work-sharing using PostgreSQL advisory locks
from django.core.cache import cache
from django.core.cache.backends.base import DEFAULT_TIMEOUT
from django.db import connection , transaction
from hashlib import md5
def cache_chained_calculation(characteristic_str, calculate_function, timeout=DEFAULT_TIMEOUT, force_update=False):
"""
Attempt to obtain result of @calculate_function, represented by @characteristic_str, through cache or calling the
function. Should only allow one caller to be calculating the value at once (enforced using postgres advisory locks),
@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 4, 2025 17:13
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

;;;; metal/compiler.lisp
;;;;
;;;; Copyright (c) 2015 Adrian Medina
(in-package :metal)
(defparameter *metal-source-paths*
(asdf:system-relative-pathname *system* "src/metal/"))
(defun metal (pathname)
@egze
egze / buildMobileVLCKit.sh
Last active January 6, 2018 16:31
Build TVVLCKit.framework with buildMobileVLCKit.sh -t
#!/bin/sh
# Copyright (C) Pierre d'Herbemont, 2010
# Copyright (C) Felix Paul Kühne, 2012-2015
set -e
BUILD_DEVICE=yes
BUILD_SIMULATOR=yes
BUILD_STATIC_FRAMEWORK=no
BUILD_STATIC_FRAMEWORK_TV=no
;; setup db to test with
;; note that this setup uses a local dev transactor
;; you can use a different transactor, but you cannot
;; use a mem db because it does not support the log API
(require '[datomic.api :as d])
(def uri "datomic:dev://localhost:4334/reified-txes")
(d/delete-database uri)
(d/create-database uri)
(def conn (d/connect uri))
// ImGui - standalone example application for Glfw + OpenGL 3, using programmable pipeline
#include <imgui.h>
#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
#include <math.h>
#include <string.h>
#include <vector>
@ocornut
ocornut / imgui_node_graph_test.cpp
Last active July 2, 2025 04:12
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().