Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
In Love

Matthew Tanudjaja mrexmelle

😍
In Love
View GitHub Profile
@mrexmelle
mrexmelle / TrackerMain.kt
Last active Apr 14, 2020
An example of how to track the percentage of multimedia file being played.
View TrackerMain.kt
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 Jan 10, 2019
epoll simple demonstration
View main_epoll.c
// 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 Mar 16, 2016
Python script to generate documentation using Grip
View create_docs.py
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):
'''
You can’t perform that action at this time.