Skip to content

Instantly share code, notes, and snippets.

View Ujang360's full-sized avatar
🏠
Working from Home

Aditya Kresna Ujang360

🏠
Working from Home
View GitHub Profile
@Ujang360
Ujang360 / .gitignore
Last active February 3, 2023 08:49
.gitignore for all of my projects
# Created by https://www.toptal.com/developers/gitignore/api/visualstudio,visualstudiocode,vim,monodevelop,dotnetcore,aspnetcore,node,unity,rust,jetbrains+all,python,pycharm+all
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudio,visualstudiocode,vim,monodevelop,dotnetcore,aspnetcore,node,unity,rust,jetbrains+all,python,pycharm+all
### ASPNETCore ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
@Ujang360
Ujang360 / Cargo.toml
Created March 8, 2020 04:04
Rust build optimization template
[workspace]
members = [
"app0",
"lib0",
]
[profile.dev]
opt-level = 0
debug = true
rpath = false
@Ujang360
Ujang360 / install_protobuf_v3.11.4_ubuntu18.04.md
Last active November 12, 2021 13:23
Install Protobuf 3.11.4 in Ubuntu 18.04
sudo apt update && sudo apt install autoconf automake libtool curl make g++ unzip -y
git clone --recursive git@github.com:protocolbuffers/protobuf.git
cd protobuf
git checkout v3.11.4 && git checkout -b release/v3.11.4
./autogen.sh
./configure
make
make check
sudo make install
@Ujang360
Ujang360 / git-clean-recursively
Created February 20, 2020 12:16
Restore repo and its submodules state into clean-current-head with `git clean-recursively`
#!/usr/bin/env bash
git clean -ffdx && git submodule foreach --recursive git clean -ffdx
@Ujang360
Ujang360 / config
Created January 29, 2020 06:53
Cargo Config - Static Linking LTO
[target.'cfg(any(unix, windows))']
rustflags = [
"-C", "lto=fat",
"-C", "link-args=-s",
"--emit=asm",
]
[target.'cfg(target_os = macos)']
rustflags = [
"-C", "link-arg=-undefined",
@Ujang360
Ujang360 / mp_fucker.py
Created December 15, 2019 10:51
Python Multiprocess Fucker
#!/usr/bin/env python3.7
import signal
import sys
import json
import logging
import time
import multiprocessing as mp
import multiprocessing.connection as mp_conn
@Ujang360
Ujang360 / Dockerfile
Created December 5, 2019 02:41 — forked from yogeek/Dockerfile
Gosu usage in Docker
FROM ubuntu
RUN apt-get install ...
# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
@Ujang360
Ujang360 / main.cpp
Last active March 8, 2022 22:46
Nanoseconds & RFC3339 Timestamp C++
#include "date.h"
#include <chrono>
#include <ctime>
#include <iostream>
#include <sstream>
typedef struct _timestamp_struct {
int64_t unixtime_ns;
std::string rfc3339;
} TimestampData;
@Ujang360
Ujang360 / matching_engine.cpp
Created October 19, 2019 16:16 — forked from dendisuhubdy/matching_engine.cpp
Ivan's Matching Engine
/*!
\file matching_engine.cpp
\brief Matching engine example
\author Ivan Shynkarenka
\date 16.08.2017
\copyright MIT License
*/
#include "trader/matching/market_manager.h"