Skip to content

Instantly share code, notes, and snippets.

Game devving 24/7

Mathias Westerdahl JCash

Game devving 24/7
Block or report user

Report or block JCash

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JCash / Dockerfile
Created Aug 16, 2019
Ubuntu 18 Docker container for building C++
View Dockerfile
#FROM i386/ubuntu:18.04
FROM ubuntu:18.04
# Base stuff
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
JCash / main.cpp
Created Aug 11, 2019
Atrix256's debug container test
View main.cpp
// the size of the image that is made into mips
#define IMAGE_SIZE() 512
typedef float ChannelType;
#include <stdio.h>
#include <array>
#include <vector>
#include <chrono>
#include "array.h"
JCash /
Created Jul 29, 2019
Create a Visual Studio Code "project" on the fly, given an executable, then launching the project
#! /usr/bin/env bash
# Use at own risk
JCash /
Created Jul 10, 2019
Create C/C++ embeddable header from binary file
#! /usr/bin/env python
import sys, os
def Usage():
print "Usage: ./ <file>"
if __name__ == '__main__':
if len(sys.argv) < 2:
JCash /
Created Jun 6, 2019
A simple way to compile the WebP encoder, since the vanilla makefiles fail on OSX
#!/usr/bin/env bash
CCFLAGS="-c -I./libwebp-1.0.2"
function compile {
local DIR=$1
local NAME=$2
for file in `ls $DIR/*.c`; do
echo $file
JCash /
Last active Nov 18, 2018
A modified version of osxcross/ Build with "SDK_VERSION=10.11 ./"
#!/usr/bin/env bash
# Build and install the cctools the SDK and macports.
# This script requires the OS X SDK and the Clang/LLVM compiler.
pushd "${0%/*}" &>/dev/null
JCash / cctools-dlfcn.patch
Last active Dec 1, 2018
A patch file to use with osxcross, to avoid a compile error. Modify to apply this patch too
View cctools-dlfcn.patch
--- include/foreign/dlfcn_backup.h 2018-11-18 21:22:45.000000000 +0100
+++ include/foreign/dlfcn.h 2018-11-18 21:23:00.000000000 +0100
@@ -3,7 +3,7 @@
#include_next <dlfcn.h>
#include <stdio.h> /* stderr */
#ifdef __CYGWIN__
-typedef struct dl_info {
+/*typedef struct dl_info {
const char *dli_fname;
void *dli_fbase;
JCash /
Last active Jul 21, 2018
If you have several folders with scan_build results, you can merge them together with this script, into one big report
#! /usr/bin/env python
import os
import re
import sys
import shutil
import argparse
from collections import defaultdict
JCash / array.cpp
Last active Jan 16, 2018
std::vector vs jc::Array test
View array.cpp
#include <stdio.h>
#include <stdlib.h>
#if defined(STL)
#include <vector>
int Calc(int count)
std::vector<int> numbers;
JCash / touchscreen.ino
Created Aug 29, 2017
Arduino touch screen example using Nintendo 2DS screen
View touchscreen.ino
// Touch screen example for arduino using a Nintendo 2ds touch screen
// Code is mostly inspired from
// and the Adafruit touch screen library
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
You can’t perform that action at this time.