Skip to content

Instantly share code, notes, and snippets.


Derry Pratama ibndias

View GitHub Profile
ibndias / erase_from_memory.h
Created Jul 15, 2021 — forked from mimoo/erase_from_memory.h
Include this file to get the `erase_from_memory` function that zeros memory. See
View erase_from_memory.h
#define __ERASE_FROM_MEMORY_H__ 1
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdlib.h>
#include <string.h>
void *erase_from_memory(void *pointer, size_t size_data, size_t size_to_remove) {
#ifdef __STDC_LIB_EXT1__
memset_s(pointer, size_data, 0, size_to_remove);
View engine.c
#include "openssl/engine.h"
#include "openssl/evp.h"
#include "rfc1321/global.h"
#include "rfc1321/md5.h"
#define MD5_DIGEST_LENGTH 16
#define MD5_CBLOCK 64
static const char *engine_id = "MD5";
static const char *engine_name = "A simple md5 engine for demonstration purposes";
ibndias / Makefile
Created Aug 5, 2020 — forked from rsperl/Makefile
self-documenting makefile with colors
View Makefile
# to see all colors, run
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done'
# the first 15 entries are the 8-bit colors
# define standard colors
BLACK := $(shell tput -Txterm setaf 0)
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
ibndias /
Created Mar 22, 2020 — forked from Vini2/
A simple implementation of a genetic algorithm
import java.util.Random;
* @author Vijini
//Main class
public class SimpleDemoGA {
ibndias /
Last active Dec 24, 2016 — forked from lurch/
Script to automatically provide internet access to a PiZero connected to a Linux host over a USB-network (only tested on Ubuntu 14.04)
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# NOTE: Before running this script for the first time, you need to run the
# following two commands on your Linux PC
# sudo sysctl -w net.ipv4.ip_forward=1
# sudo iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE
# (replace eth0 in the second command with your internet-facing network device,
# e.g. wlan0 on a laptop)
# The Avahi-discovered hostname
ibndias /
Last active Feb 17, 2019 — forked from gbaman/
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details -

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. Finally, open up the cmdline.txt. Be careful with this file, it is very picky with its formatting! Each parameter is seperated by a single