Skip to content

Instantly share code, notes, and snippets.

View kungfooman's full-sized avatar

Hermann Rolfes kungfooman

View GitHub Profile
type keyboard_s
forward::Int32
backward::Int32
left::Int32
right::Int32
jump::Int32
end
thekeyboard = keyboard_s(1,2,3,4,5)
# julia -i readwritepointer.js
type keyboard_s
forward::Int32
backward::Int32
left::Int32
right::Int32
jump::Int32
end
address = ccall(:malloc, (Int64), (Int64, ), sizeof(keyboard_s))
type keyboard_s
forward::Int32
backward::Int32
left::Int32
right::Int32
jump::Int32
end
address = ccall(:malloc, (Int64), (Int64, ), sizeof(keyboard_s))
ptr = Ptr{keyboard_s}(address)
thekeyboard = unsafe_load(ptr)
print("Haii")
function log(str)
#return ccall(:julia_log, Int, (Cstring,), str)
#print(str)
leetmenu_log(leetmenu, str);
end
function pprint(data)
<?php
function handle_mysql_error()
{
die(mysql_error());
}
mysql_connect("127.0.0.1:3306", "username", "password") OR handle_mysql_error();
mysql_select_db("tracker") OR handle_mysql_error();
?>
<html>
@kungfooman
kungfooman / statemachine.js
Created May 4, 2017 20:18
statemachine without export stuff
var StateMachine = {
//---------------------------------------------------------------------------
VERSION: "2.4.0",
//---------------------------------------------------------------------------
Result: {
@kungfooman
kungfooman / dukman2.c
Created May 4, 2017 20:12
statemachine test
#include <stdio.h>
#include "duktape.h"
duk_ret_t duk_func_log(duk_context *ctx) {
int i;
int n = duk_get_top(ctx); /* #args */
char *res;
for (i = 0; i < n; i++) {
res = (char *)duk_to_string(ctx, i);
printf("%s", res);
@kungfooman
kungfooman / dukman.c
Created May 4, 2017 19:29
global test
#include <stdio.h>
#include "duktape.h"
duk_ret_t duk_func_log(duk_context *ctx) {
int i;
int n = duk_get_top(ctx); /* #args */
char *res;
for (i = 0; i < n; i++) {
res = (char *)duk_to_string(ctx, i);
printf("%s", res);
@kungfooman
kungfooman / tr_backend.c
Created March 27, 2017 15:24
Kinda works, but then not...
// When it works: https://i.gyazo.com/cf1ddce65f0eb0233e2389e63487a8ee.jpg
// When it doesn't work: https://i.gyazo.com/42e3ef72ffa244c26f2a9503e70af5e6.png
// I am calling simpletriangle() in renderer2/tr_backend.c at the end of RB_RenderViewFront:
// https://github.com/etlegacy/etlegacy/blob/master/src/renderer2/tr_backend.c#L6045
static void simpletriangle() {
GLuint shader_programme;
GLuint vao;
@kungfooman
kungfooman / asd
Created March 24, 2017 21:10
asd
textures/aaaaaaaaaaa/kungfuckintest
{
qer_editorimage textures/kungtile/tile6_dio.jpg
surfaceparm woodsteps
map textures/kungtile/tile6_dio.jpg
bumpMap textures/kungtile/tile6_dio_n.jpg
implicitMap textures/kungtile/tile6_dio.jpg
}