Skip to content

Instantly share code, notes, and snippets.

View rakin406's full-sized avatar
😁

Rakin Rahman rakin406

😁
View GitHub Profile
@rafaelnp
rafaelnp / vim-plug-install.vim
Created June 12, 2020 12:50
Neovim auto-install vim-plug
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
@adamnemecek
adamnemecek / gist:ae2755c5c4eaabd0d864e6c62dbe5088
Created November 28, 2019 21:10 — forked from LearnCocos2D/gist:77f0ced228292676689f
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
@manzanit0
manzanit0 / pooled_crawler.ex
Last active July 25, 2022 08:58
Web crawler which uses Floki and HTTPoison – does 5 request at a time
# Dependencies:
# {:httpoison, "~> 1.5"},
# {:floki, "~> 0.21.0"}
# {:benchee, "~> 1.0"} (Only for benchmarking – not in the script)
defmodule CrawlQueue do
use Agent
def start_link(urls) do
@SpotlightKid
SpotlightKid / notes.rst
Last active July 30, 2025 03:39
Building your Kivy App for Android

Building your Kivy App for Android

Requirements

You need:

  • A reasonably modern Android device with a USB port
  • A micro USB cable
@DomPizzie
DomPizzie / README-Template.md
Last active December 5, 2025 06:01
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@wojteklu
wojteklu / clean_code.md
Last active December 9, 2025 08:55
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@LearnCocos2D
LearnCocos2D / gist:77f0ced228292676689f
Last active October 13, 2025 07:14
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
@clemtibs
clemtibs / Commit Formatting.md
Last active July 6, 2025 15:32
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@nilsso
nilsso / SDL_example.cpp
Created October 2, 2014 18:04
SDL example
/* Example of initializing SDL */
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_keyboard.h>
#include <cstdlib>
#include <string>
using namespace std;