Skip to content

Instantly share code, notes, and snippets.

@Superstar64
Superstar64 / array.c
Last active May 18, 2019 02:24
Mustache Templates with C
#include "stdint.h"
#include "stdlib.h"
typedef struct {
int* ptr;
size_t length;
} NFXHICQ_;
NFXHICQ_ create_NFXHICQ_(int* ptr, size_t length){
@Superstar64
Superstar64 / fix.js
Last active January 22, 2020 20:30
fix in javascript
/*
Copyright (C) Freddy A Cubas "superstar64" 2019
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
@Superstar64
Superstar64 / TypeClass.java
Last active November 26, 2021 05:45
Typeclasses in Java
/*
Copyright (C) Freddy A Cubas "superstar64" 2019
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
@Superstar64
Superstar64 / robot.hs
Last active February 13, 2019 20:37
2016 ACM ICPC Regionals Division 2 Problem 2
{-
Copyright (C) Freddy A Cubas "Superstar64" 2019
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
@Superstar64
Superstar64 / IOMonads.cpp
Last active May 17, 2018 13:26
IO Monads in C++
#include <iostream>
#include <string>
#include <tuple>
auto getString = [] {
return []() {
std::string string;
getline(std::cin, string);
return string;
};
};
@Superstar64
Superstar64 / LICENSE
Last active March 18, 2017 21:55
C++ shared libraries compatibility
Copyright (C) Freddy A Cubas "Superstar64"
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
@Superstar64
Superstar64 / makefile
Last active February 21, 2019 23:43
D in makefiles
.ONESHELL:
SHELL = rdmd
.SHELLFLAGS = --eval
squares.txt:
auto squares = sequence!("n*n").take(100);
std.file.write("$@",squares.to!string);
@Superstar64
Superstar64 / path.c
Last active March 18, 2017 03:53
A* pathing in preallocated memory
/*Boost Software License - Version 1.0 - August 17th, 2003
Copyright (c) 2015 Freddy A Cubas "Superstar64"
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following: