export allocation functinos from zig
comptime {
@import("calloc").wrapAllocator(struct {
pub fn getAllocator() std.mem.Allocator {
return …;
}
import SwiftUI | |
enum OSDocumentError: Error { | |
case unknownFileFormat | |
} | |
#if canImport(UIKit) | |
import UIKit |
#include <windows.h> | |
#include <stdio.h> | |
#define DIRECTINPUT_VERSION 0x0800 | |
#include <dinput.h> | |
#pragma comment(lib, "dinput8.lib") | |
#pragma comment(lib, "dxguid.lib") | |
class DiJoyStick { | |
public: |
#include <iostream> | |
#include <assert.h> | |
#include <vector> | |
template<class T> | |
struct Func{}; | |
// std::func replacement without dynamic memory allocation (captures are limited to 48 bytes) | |
// this could be extended to support captures >48 bytes... of course, with a bit more of logic | |
// and some state. |
#!/bin/bash | |
# This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches | |
# It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged | |
# time ./clear_git_repositor.bash >cleaning.log | |
# We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming) | |
# MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files | |
MAXIMUM_PASSES=10 # Maximum number of passes |
#!/bin/sh | |
## setup _________________________________ | |
TMUX_VER=2.9a | |
LIBEVENT_VER=2.1.11-stable | |
TEMP_COMPILE=~/tmux-temp-compile | |
COMMON_INSTALL_PREFIX=/opt | |
SYMLINK=/usr/local/bin/tmux |
#!/bin/sh | |
## setup _________________________________ | |
TMUX_VER=2.9a | |
LIBEVENT_VER=2.1.11-stable | |
TEMP_COMPILE=~/tmux-temp-compile | |
COMMON_INSTALL_PREFIX=/opt | |
SYMLINK=/usr/local/bin/tmux |
#pragma once | |
/* | |
// Example use on Windows with links opening in a browser | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include "Shellapi.h" | |
inline void LinkCallback( const char* link_, uint32_t linkLength_ ) |
#include <any> | |
#include <cmath> | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
#include "NodeGraph.hpp" | |
namespace | |
{ |
ImGuiStyle& style = ImGui::GetStyle(); | |
style.ChildWindowRounding = 3.f; | |
style.GrabRounding = 0.f; | |
style.WindowRounding = 0.f; | |
style.ScrollbarRounding = 3.f; | |
style.FrameRounding = 3.f; | |
style.WindowTitleAlign = ImVec2(0.5f,0.5f); | |
style.Colors[ImGuiCol_Text] = ImVec4(0.73f, 0.73f, 0.73f, 1.00f); |