This file contains hidden or 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
### Some Keybinds that I always forgot | |
Alt + C - Convert to mesh. | |
Ctrl + Alt + Numpad 0 - Snap the camera to the position of the view. | |
Shift + B - Render border. | |
Ctrl + Alt + B - Clear render border. | |
M - Object move to layer. | |
### Navigation |
This file contains hidden or 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
### going back the backtrace | |
backtrace | |
select-frame [frameno] | |
up | |
down | |
### reversing stepping in the code | |
target record-full | |
reverse-{next, continue, step} |
This file contains hidden or 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
# build library dll | |
g++ -c -DBUILDING_EXAMPLE_DLL example_dll.cpp | |
g++ -shared -o example_dll.dll example_dll.o -Wl,--out-implib,libexample_dll.a | |
# build executable | |
g++ -c example_exe.cpp | |
g++ -o example_exe.exe example_exe.o -L. -lexample_dll | |
# build without an import library | |
g++ -o example_exe.exe example_exe.o example_dll.dll |
This file contains hidden or 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
/// compiling: | |
/// g++ -std=c++0x -o example example.cpp -I./libtool/include/ -L./libtool/lib/ -lltdl | |
/// | |
#include <cstdio> | |
#include <iostream> | |
#include <memory> | |
#include <ltdl.h> | |
int main() |
This file contains hidden or 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
# vertex shader | |
``` | |
#version 150 | |
attribute vec3 position; | |
void main() | |
{ | |
gl_Position = vec4(position, 1.0); | |
} | |
``` |
This file contains hidden or 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
# here is the cmake command to generate makefile | |
cmake -G "Unix Makefiles" -D CMAKE_MAKE_PROGRAM="mingw32-make.exe" -D FREETYPE_INCLUDE_DIRS="../Dependencies/freetype/include;../Dependencies/freetype/include/freetype2" -D FREETYPE_LIBRARY="../Dependencies/freetype/lib/libfreetype.dll.a" . |
This file contains hidden or 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
# create a file named compile.bat in the **root** directory of the glew build director | |
# it will create files .a and .dll in lib directory | |
gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c src/glew.c | |
gcc -shared -Wl,-soname,libglew32.dll -Wl,--out-implib,lib/libglew32.dll.a -o lib/glew32.dll src/glew.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 | |
ar cr lib/libglew32.a src/glew.o | |
gcc -DGLEW_NO_GLU -DGLEW_MX -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.mx.o -c src/glew.c | |
gcc -shared -Wl,-soname,libglew32mx.dll -Wl,--out-implib,lib/libglew32mx.dll.a -o lib/glew32mx.dll src/glew.mx.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 | |
ar cr lib/libglew32mx.a src/glew.mx.o |
This file contains hidden or 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
# run `diskpart` command | |
# inside diskpart type the commands | |
# this commands create 16GB of virtual hard disk | |
create vdisk file="file.vhd" maximum=16000 | |
# attach the vdisk and create partition | |
attach vdisk | |
create partition primary |
This file contains hidden or 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
# here is the code to convert img to vdi format | |
# it is useful especially for uefi based image | |
VBoxManage convertfromraw --format VDI [filename].img [filename].vdi |
This file contains hidden or 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
# stops checking the working tree file for possible modification | |
git update-index --assume-unchanged [filename] | |
# does the opposite of the above (starts checking) | |
git update-index --no-assume-unchanged [filename] |