Skip to content

Instantly share code, notes, and snippets.


Érico Vieira Porto ericoporto

View GitHub Profile
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
pzurek /
Last active Nov 24, 2020
Twelve Go Best Practices
WesThorburn /
Last active Nov 24, 2020
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone
  • Enter the cloned directory: cd emsdk
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./
  • Configure emsdk in your bash profile by running: echo 'source "/home/user/emsdk/"' >> $HOME/.bash_profile
MarcoQin / ffmpeg_tutorial05.c
Last active Nov 24, 2020
ffmpeg tutorial 05 with SDL2 and audio resampling fix
View ffmpeg_tutorial05.c
// tutorial05.c
// A pedagogical video player that really works!
// Code based on FFplay, Copyright (c) 2003 Fabrice Bellard,
// and a tutorial by Martin Bohme (
// Tested on Gentoo, CVS version 5/01/07 compiled with GCC 4.1.1
// With updates from
// Updates tested on:
// LAVC 54.59.100, LAVF 54.29.104, LSWS 2.1.101, SDL 1.2.15
// on GCC 4.7.2 in Debian February 2015
slime73 / sdl-metal-example.m
Last active Nov 23, 2020
SDL + Metal example
View sdl-metal-example.m
* This software is in the public domain. Where that dedication is not recognized,
* you are granted a perpetual, irrevokable license to copy and modify this file
* as you see fit.
* Requires SDL 2.0.4.
* Devices that do not support Metal are not handled currently.
#import <UIKit/UIKit.h>
gcatlin / sdl-metal-example.m
Last active Nov 23, 2020
Minimal C SDL2 Metal example
View sdl-metal-example.m
// cc sdl-metal-example.m `sdl2-config --cflags --libs` -framework Metal -framework QuartzCore && ./a.out
#include <SDL.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
int main (int argc, char *args[])
TSiege / The Technical Interview Cheat
Last active Nov 23, 2020
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


sangeeths / github-to-bitbucket
Created Mar 10, 2014
Forking a Github repo to Bitbucket
View github-to-bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
bradmontgomery /
Last active Nov 16, 2020
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
Very simple HTTP server in python (Updated for Python 3.7)
./ -h
./ -l localhost -p 8000
Send a GET request:
flibitijibibo /
Created Jun 17, 2016
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

I would recommend looking at that first! After that, read on...

You can’t perform that action at this time.