Skip to content

Instantly share code, notes, and snippets.

View aiekick's full-sized avatar

Aiekick aiekick

View GitHub Profile
@aiekick
aiekick / Android Privacy Policy Template
Created October 31, 2018 15:02 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@aiekick
aiekick / uv_mercator_project.py
Created June 7, 2020 19:43 — forked from batFINGER/uv_mercator_project.py
Mercator UV Projection
bl_info = {
"name": "Mercator Project",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Mesh > UV UnWrap > Mercator Project",
"description": "UV Mercator Projection",
"warning": "",
"wiki_url": "",
"category": "UV",
@aiekick
aiekick / Simulation_Projection.md
Created February 18, 2023 22:14 — forked from vassvik/Simulation_Projection.md
Realtime Fluid Simulation: Projection

Realtime Fluid Simulation: Projection

The core of most real-time fluid simulators, like the one in EmberGen, are based on the "Stable Fluids" algorithm by Jos Stam, which to my knowledge was first presented at SIGGRAPH '99. This is a post about one part of this algorithm that's often underestimated: Projection

MG4_F32.mp4

Stable Fluids

The Stable Fluids algorithm solves a subset of the famous "Navier Stokes equations", which describe how fluids interact and move. In particular, it typically solves what's called the "incompressible Euler equations", where viscous forces are often ignored.

@aiekick
aiekick / gist:045c931f9c059b5616088dbb4fe46808
Last active May 23, 2024 19:50
Get the ouput of a linux commend in a std::string (here in Clion for a ShaOne)
#include <string>
#include <cstdio>
#include <cassert>
#include <fstream>
#include <iostream>
#include <cryptopp/sha.h>
#include <boost/algorithm/hex.hpp>
void addFileToSha(const std::string& vFilePathName, CryptoPP::SHA1& vShaRef) {
std::ifstream file;
@aiekick
aiekick / LinuxProcessOutputFromCode.cpp
Last active May 23, 2024 20:00
Get the ouput of a linux command in a std::string (here in Clion for a ShaOne)
#include <string>
#include <cstdio>
#include <cassert>
#include <fstream>
#include <iostream>
#include <cryptopp/sha.h>
#include <boost/algorithm/hex.hpp>
void addFileToSha(const std::string& vFilePathName, CryptoPP::SHA1& vShaRef) {
std::ifstream file(vFilePathName);
@aiekick
aiekick / nan_inf.cpp
Created June 13, 2024 13:03
nan / inf
#include <cmath>
#include <iostream>
#include <cstdint>
template<typename T>
void printBin(const T& t){
size_t nBytes=sizeof(T);
char* rawPtr((char*)(&t));
for(size_t byte=0; byte<nBytes; byte++){
for(size_t bit=0; bit<8; bit++){
@aiekick
aiekick / setup-slave.sh
Created September 7, 2024 02:04 — forked from mariusvw/setup-slave.sh
Auto install Jenkins slave on Debian
#!/bin/bash
# Input
newhost=$1
applicationStart=$2
###
# Functions
###
updateBaseInstall() {
@aiekick
aiekick / latency.txt
Created December 9, 2024 01:14 — forked from understeer/latency.txt
HPC-oriented Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference/hit 1.5 ns 4 cycles
Floating-point add/mult/FMA operation 1.5 ns 4 cycles
L2 cache reference/hit 5 ns 12 ~ 17 cycles
Branch mispredict 6 ns 15 ~ 20 cycles
L3 cache hit (unshared cache line) 16 ns 42 cycles
L3 cache hit (shared line in another core) 25 ns 65 cycles
Mutex lock/unlock 25 ns
L3 cache hit (modified in another core) 29 ns 75 cycles
@aiekick
aiekick / baseIInternalDatasDerivation.cpp
Last active December 15, 2024 23:39
base internal datas derivation
#include <iostream>
#include <cassert>
#include <memory>
#include <string>
struct Datas {
std::string name;
Datas() = default;
explicit Datas(const std::string& vName) : name(vName) {}
virtual ~Datas() = default;