Skip to content

Instantly share code, notes, and snippets.

@kanru
kanru / Android.mk
Created January 6, 2012 04:16
Android GPS using libhardware
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
gps_test.cpp
LOCAL_SHARED_LIBRARIES := \
libcutils libhardware
LOCAL_MODULE:= test-gps
@kwk
kwk / CMakeLists.txt
Last active February 14, 2024 08:53
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@Kos
Kos / formats.txt
Last active June 24, 2024 15:42
OpenGL image formats along with their unsized variants and preferred formats for pixel transfer (Written by hand, needs verification) Pixel store for compressed textures not provided because there are glCompressedTexImage and family for them. EXT_texture_compression_s3tc formats not included.
| Image format (sized) | Unsized | Compr | Pixel format | Pixel type |
|---------------------------------------|--------------------|-------|--------------------|-----------------------------------|
| GL_R8 | GL_RED | False | GL_RED | GL_UNSIGNED_BYTE |
| GL_R8_SNORM | GL_RED | False | GL_RED | GL_BYTE |
| GL_R16 | GL_RED | False | GL_RED | GL_UNSIGNED_SHORT |
| GL_R16_SNORM | GL_RED | False | GL_RED | GL_SHORT |
| GL_R32F | GL_RED | False | GL_RED | GL_FLOAT |
| GL_R8I | GL_RED | False | GL_RED_INTEGER | GL_INT |
@rygorous
rygorous / gist:5379497
Created April 13, 2013 18:25
How I got my job at RAD.
First mail I ever got from Jeff:
----
From: Jeff Roberts
Subject: dude!
To: Fabian "ryg" Giesen
Date: 5/17/2009 2:42PM
Hey, man - I don't think we have ever talked before directly!
@kcrt
kcrt / erf.js
Last active May 21, 2018 21:27
simple implementation of mathematic function erf "Error function", in JavaScript JavaScriptによる誤差関数の実装
function erf(x){
// erf(x) = 2/sqrt(pi) * integrate(from=0, to=x, e^-(t^2) ) dt
// with using Taylor expansion,
// = 2/sqrt(pi) * sigma(n=0 to +inf, ((-1)^n * x^(2n+1))/(n! * (2n+1)))
// calculationg n=0 to 50 bellow (note that inside sigma equals x when n = 0, and 50 may be enough)
var m = 1.00;
var s = 1.00;
var sum = x * 1.0;
for(var i = 1; i < 50; i++){
m *= i;
@hofmannsven
hofmannsven / README.md
Last active July 3, 2024 09:53
Git CLI Cheatsheet
@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 5, 2024 10:29
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@Sumolari
Sumolari / installDS.sh
Last active August 29, 2015 14:14
Instalar toolkit Nintendo DS
# Instalar mis herramientas de terminal favoritas.
# sudo apt-get update -qy
# sudo apt-get upgrade -qy
# sudo apt-get install vim git curl zsh git-core wget -qy
# wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
# chsh -s `which zsh`
# Necesario para poder instalar el Toolkit de Nintendo DS
sudo dpkg --add-architecture i386
@mandiwise
mandiwise / Update remote repo
Last active June 21, 2024 13:14
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket