Skip to content

Instantly share code, notes, and snippets.

View Green-Sky's full-sized avatar
😜
*typing...*

Erik Scholz Green-Sky

😜
*typing...*
View GitHub Profile
@Green-Sky
Green-Sky / insel-test.cpp
Created September 4, 2017 20:13
anno1602 island (.scp) parser v1
#include "island.hpp"
#include <cassert>
void printIsland(Island* i) {
for (uint8_t y = 0; y < i->dim_y; y++) {
for (uint8_t x = 0; x < i->dim_x; x++) {
short num = i->map[std::make_pair(x, y)].num;
if (num > 900 && num <= 1000)
std::cout << "FF";
@Green-Sky
Green-Sky / powerdelta.cpp
Created January 29, 2017 10:06
quick n dirty code to monitor powerconsumption
#include <iostream>
#include <chrono>
#include <thread>
#include <fstream>
#define PATH "/sys/class/powercap/intel-rapl:0/energy_uj"
int main(void) {
std::ifstream file(PATH);