This is a notepad for my journey to learn opengl's programmable pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#include <stdlib.h> | |
int map_create(lua_State *lua); | |
int map_slice(lua_State *lua); | |
int main(int argc, char **argv){ | |
lua_State *lua = lua_open(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <[email protected]> | |
-- licensed under the terms of the LGPL2 | |
-- character table string | |
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
-- encoding | |
function enc(data) | |
return ((data:gsub('.', function(x) | |
local r,b='',x:byte() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing Arch: | |
sudo vim /etc/pacman.conf | |
Update packages list: sudo pacman -Syy | |
run sudo pacman -Syu before installing any software (to update the repositories first) | |
* Timing issue: | |
- Change hardware clock to use UTC time: | |
sudo timedatectl set-local-rtc 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function string.fromhex(str) | |
return (str:gsub('..', function (cc) | |
return string.char(tonumber(cc, 16)) | |
end)) | |
end | |
function string.tohex(str) | |
return (str:gsub('.', function (c) | |
return string.format('%02X', string.byte(c)) | |
end)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class BezierCurveScript : MonoBehaviour { | |
public class BezierPath | |
{ | |
public List<Vector3> pathPoints; | |
private int segments; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman | |
====== | |
view logs: /var/log/pacman.log | |
update system | |
# pacman -Syu | |
list installed packages | |
# pacman -Q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cinttypes> | |
extern "C" { | |
__declspec(dllexport) void array_to_mat2d_byte(unsigned char* data, unsigned char** mat, size_t w, size_t h) { | |
for (size_t i = 0; i < w; ++i) { | |
mat[i] = data + h * i; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo mount -o remount,size=10G,noatime /tmp | |
echo "Done. Please use 'df -h' to make sure folder size is increased." |
OlderNewer