Skip to content

Instantly share code, notes, and snippets.

View mrexmelle's full-sized avatar
😍
In Love

Matthew Tanudjaja mrexmelle

😍
In Love
View GitHub Profile
@mrexmelle
mrexmelle / TrackerMain.kt
Last active April 14, 2020 09:17
An example of how to track the percentage of multimedia file being played.
import java.util.BitSet
const val MIN = 6
const val SEC = 11
fun countSec(m: Int, s: Int): Int {
return (60 * m) + s
}
@mrexmelle
mrexmelle / main_epoll.c
Created January 10, 2019 17:02
epoll simple demonstration
// compile: gcc main_epoll.c -o main_epoll -std=c99
// run: ./main_epoll
// environment: Linux
#define MAX_EVENTS 5
#define READ_SIZE 5
#include <signal.h>
#include <stdio.h>
#include <string.h>
@mrexmelle
mrexmelle / create_docs.py
Created March 16, 2016 08:59
Python script to generate documentation using Grip
import getopt
import re, shutil, tempfile
import os
import subprocess
import sys
# http://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python
def sed_inplace(filename, pattern, repl):
'''