Skip to content

Instantly share code, notes, and snippets.

View adragomir's full-sized avatar

Andrei Dragomir adragomir

View GitHub Profile
diff --git i/Cargo.toml w/Cargo.toml
index 8e89e5ef3..c8e920051 100644
--- i/Cargo.toml
+++ w/Cargo.toml
@@ -61,7 +61,7 @@ arrow = { version = "51.0.0", features = ["prettyprint"] }
arrow-array = { version = "51.0.0", default-features = false, features = ["chrono-tz"] }
arrow-buffer = { version = "51.0.0", default-features = false }
arrow-flight = { version = "51.0.0", features = ["flight-sql-experimental"] }
-arrow-ipc = { version = "51.0.0", default-features = false, features = ["lz4"] }
+arrow-ipc = { version = "51.0.0", default-features = false, features = ["lz4", "zstd"] }
env EDITOR=nvim
env GIT_EDITOR=nvim
env VISUAL=nvim
env LANG="en_US.UTF-8"
env LANGUAGE="en_US.UTF-8"
env LC_ALL="en_US.UTF-8"
env CLICOLOR=1
env SSH_AUTH_SOCK=${HOME}/.ssh/.ssh-agent.sock
env LESS="-rX"
env PAGER=less
@adragomir
adragomir / Makefile
Created October 27, 2023 20:00 — forked from LiquidityC/Makefile
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@adragomir
adragomir / dyn_arr.h
Created March 23, 2023 21:00 — forked from nicebyte/dyn_arr.h
dyn_arr
#pragma once
#define DYN_ARR_OF(type) struct { \
type *data; \
type *endptr; \
uint32_t capacity; \
}
#if !defined(__cplusplus)
#define decltype(x) void*
@adragomir
adragomir / emcapplication configure.ac
Created April 26, 2022 18:48
EMCApplication + Machinekit-hal
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# Description: configure.ac
# Autonconf produce a ./configure from this file
# that's used to discover various programs/dependencies
# usage: autoconf
#
# Authors: paul_c alex_joni jepler
# License: GPL Version 2
@adragomir
adragomir / protobuf261.rb
Last active April 8, 2021 20:05 — forked from yoo-bit/protobuf261.rb
brew formula to install [email protected]
class Protobuf261 < Formula
desc "Protocol buffers - Google data interchange format"
homepage "https://github.com/google/protobuf/"
stable do
url "https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2"
sha256 "0a2f8533b2e0587a2b4efce0c4c8aea21bbfae1c41c466634d958dedf580f6aa"
# Fixes the unexpected identifier error when compiling software against protobuf:
# https://github.com/google/protobuf/issues/549
@adragomir
adragomir / c.scm
Created November 18, 2020 21:57 — forked from carld/c.scm
The compiler from my blog article
(define emit printf)
(define (compile exp)
(cond
[(fixnum? exp) (emit "push ~a~%" exp)]
[(eq? '+ (car exp)) (begin
(compile (cadr exp))
(compile (caddr exp))
(emit "pop eax~%")
(emit "pop ebx~%")
// is_throttled should throttle a request per api to 10 requests per second
function is_throttled(...) {
}
function api($endpoint) {
if (is_throttled(...)) {
return "429 too soon";
}
// is_throttled should throttle a request per api to 10 requests per second
function is_throttled(...) {
}
function api($endpoint) {
if (is_throttled(...)) {
return "429 too soon";
}
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
struct lbp_serializer
{
int32_t DataVersion;
FILE* FilePtr;