Skip to content

Instantly share code, notes, and snippets.

View danilolc's full-sized avatar
🙃

Danilo danilolc

🙃
  • Rio de Janeiro, Brazil
View GitHub Profile
@danilolc
danilolc / cool_csv.cpp
Last active March 16, 2024 03:00
Function to transform a CSV line into C++ variables.
// Danilo Lemos - 2021
// cool_csv.cpp
// ======================
// A small and free to use/edit function to read a CSV line.
#include <string>
#include <sstream>
#include <iostream>
void Cool_CSV(const std::string &line) {}
@danilolc
danilolc / Makefile
Created November 24, 2020 15:51
A small and flexible makefile example for a c++ game
# Danilo Lemos - 2020
# A free to use and edit Makefile
# It compiles and links the game's
# source code inside src/ directory.
# Change the following variables as you need.
# Compiler:
CXX = g++
@danilolc
danilolc / bhbusget.py
Created November 16, 2017 21:42
Este código recebe uma linha de ônibus de Belo Horizonte e retorna as estações e as previsões de chegada em cada estação.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Danilo Lemos - 2017
#bhbusget.py
#---------------------
#Este código é livre para ser compartilhado ou alterado, sem nenhuma restrição.
#Ele pega os dados usados no aplicativo de horário de ônibus da prefeitura de Belo Horizonte.
#Ele aceita como entrada o número de uma linha de ônibus e ordena o horário em cada estação.
#---------------------
@danilolc
danilolc / change_frequency.c
Last active November 9, 2022 00:40
A small code to change a sfx frequency with SDL_mixer.
//Danilo Lemos - 2017 - 2020
//change_frequency.c
//======================
//A small function to play a SDL_mixer's chunk in a different frequency.
//It was written to be used on the Pekka Kana 2 SDL2 game project, and is free to use and edit.
#include <SDL_mixer.h>
#include <stdio.h>
#define MIX_CHANNELS 8 //Number of channels used