Skip to content

Instantly share code, notes, and snippets.


Derry Pratama ibndias

View GitHub Profile
oskar456 /
Last active Nov 25, 2021
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env python3
import subprocess
import json
import os
from pathlib import Path
import requests
from requests.compat import urljoin
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";
mimoo / erase_from_memory.h
Last active Jul 15, 2021
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);
Vini2 /
Last active Jun 18, 2021
A simple implementation of a genetic algorithm
import java.util.Random;
* @author Vijini
//Main class
public class SimpleDemoGA {
gbaman /
Last active Nov 25, 2021
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. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

reaandrew / printbits
Created Jun 3, 2014
Print bits for a long int in C
View printbits
#include <stdio.h>
int main(){
printf("bitwise operations\n");
unsigned long int num = 10;
int i;
for(i= (sizeof(unsigned long int)*8)-1;i>= 0; i--){
char c = (num &(1LL<<i))? '1' : '0';
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname