Skip to content

Instantly share code, notes, and snippets.

View dlisboa's full-sized avatar

Diogo Lisboa dlisboa

View GitHub Profile
@dlisboa
dlisboa / Makefile
Last active May 3, 2024 18:35 — forked from alexedwards/Makefile
Boilerplate Makefile for Go projects
# !!!!!
# VEJA A VERSÃO SIMPLIFICADA ABAIXO
# !!!!!
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
@dlisboa
dlisboa / gotcha.py
Last active August 29, 2015 14:12 — forked from skatenerd/gotcha.py
def make_adder():
grand_total = 0
def adder(to_add):
print "Grand total moved from: %s" % grand_total
grand_total += to_add
print "To: %s \n" % grand_total
return grand_total
return adder
adder = make_adder()
@dlisboa
dlisboa / jmp.c
Created October 24, 2013 16:34 — forked from anonymous/-
#include <setjmp.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
jmp_buf jump;
int status = setjmp(jump);
puts("yes");
longjmp(jump, status);