Skip to content

Instantly share code, notes, and snippets.

@yni3
yni3 / stringify.hpp
Last active April 23, 2019 23:36
C++ : concat Variadic parameters (float,int,string) to string
/*
stringify.h -- [C++11] concat varaiadic paramaters to string
April 22th, 2019
Copyright 2019 yni3
License : Public Domain
*/
#pragma once
#ifndef __STRINGIFY_H__
#define __STRINGIFY_H__
@yni3
yni3 / SimpleBinarySemaphore.cpp
Created January 27, 2018 13:11
C++11 BinarySemaphore
/*
SimpleBinarySemaphore.cpp -- implement for SimpleBinarySemaphore.h
Copyright 2018 yni3
License : Public Domain (useful for copy and paste for your project)
*/
#include "SimpleBinarySemaphore.h"
#include <chrono>
#include <mutex>
@yni3
yni3 / SimpleThread.cpp
Created January 27, 2018 13:12
[C++11] thread
/*
SimpleThread.cpp -- implement for SimpleThread.h
Copyright 2018 yni3
License : Public Domain (useful for copy and paste for your project)
*/
#include "SimpleThread.h"
#if defined(_UNIX) || defined(__ANDROID__) || defined(__APPLE__)
#include <pthread.h>
@yni3
yni3 / SimpleMutex.cpp
Last active April 16, 2019 14:44
Mutex using C++11
/*
SimpleMutex.cpp -- implement for SimpleMutex.h
Copyright 2018 yni3
License : Public Domain (useful for copy and paste for your project)
*/
#include "SimpleMutex.h"
#include <mutex>
#include <utility>
@yni3
yni3 / ARCFOUR.h
Last active February 1, 2018 13:36
ARCFOUR implemenation
/*
ARCFOUR.h -- ARCFOUR implemenation
Copyright 2018 yni3
License : Public Domain (useful for copy and paste for your project)
*/
#pragma once
#ifndef __ARCFOUR
@yni3
yni3 / Base32.hpp
Created February 7, 2018 11:25
Base32 implemenation
/*
Base32.hpp -- Base32 implemenation
Copyright 2018 yni3
License : Public Domain
*/
#pragma once
#ifndef __BASE32
@yni3
yni3 / ChaCha20.h
Created March 24, 2018 01:38
Chacha20 encryption
/*
Base32.hpp -- Chacha20 encryption
Copyright 2018 yni3
License : Public Domain
*/
#pragma once
#ifndef __CHACHA20
#define __CHACHA20