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 <SDL/SDL.h> | |
void _dispatch(SDL_Event e, bool * r) { | |
while (SDL_PollEvent (&e)) { | |
switch (e.type) { | |
case SDL_QUIT: | |
*r = false; | |
break; | |
} | |
} |
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 <iostream> | |
#include <string> | |
using namespace std; | |
template <class _st> class stack { | |
public: | |
stack(); | |
void push(_st 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
; -- nasm -f bin pine.s -o pine.bin | |
; -- copy pine.bin pine.img | |
; -- boot! | |
[BITS 16] ; make this into 16bit code | |
[ORG 0x7C00] ; load into memory here | |
_main: | |
mov ax, 0x0000 ; setup the data segment register (step1) | |
mov ds, ax ; move ax into ds (step2) |
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
start vim | |
while editing is not finished, repeat | |
navigate to desired position in NORMAL mode | |
enter INSERT mode by pressing i | |
type text | |
exit INSERT mode by pressing <ESCAPE> | |
when editing is finished, type :wq | |
sourced from : http://37.200.69.165/doku.php?id=llthw:ex1 |
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
Show hidden characters
{ | |
"cmd": ["nasm", "-f", "bin", "${file}", "-o", "${file_path}/${file_base_name}.COM"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}" | |
} | |
// syntax for cmdline building : http://www.nasm.us/xdoc/2.10.06/html/nasmdoc2.html#section-2.1 | |
// syntax for sublime build system : http://sublimetext.info/docs/en/reference/build_systems.html (outdated)? | |
// replace nasm and update switches as needed.. ;ie.. fasm etc | |
// ${file} refers to the current saved file.. ${file_path} etc.. |
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
@echo off | |
echo INFO -- mingw64/bin added to path | |
set Path=C:\mingw64\bin;%PATH% | |
echo INFO -- navigating to cygwin/bin | |
cd ../../../cygwin/bin | |
echo INFO -- moving troublesome sh.exe to tmp dir | |
move sh.exe C:\Users\iKlsR |
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 "iostream" | |
#include <stdlib.h> | |
#include <stdio.h> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
long long unsigned int * ptr = new long long unsigned int; /* modern */ |
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 "iostream" | |
using namespace std; | |
int unpack(int array[], int size) { | |
int index = 0; | |
int i = 0; | |
for(; i < size; ++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
#include "model.hpp" | |
#include "global.hpp" | |
#include <sys/stat.h> | |
#include <glm/gtx/integer.hpp> | |
#include <glm/gtc/quaternion.hpp> | |
#include <glm/gtx/quaternion.hpp> | |
#include <assimp/postprocess.h> | |
#include <assimp/scene.h> | |
#include <sstream> |
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 <stdio.h> | |
typedef struct { | |
char t; | |
int x, y; | |
} swizzle; | |
swizzle image; |