Skip to content

Instantly share code, notes, and snippets.

View maixuanhan's full-sized avatar

Han Mai maixuanhan

  • Ho Chi Minh city
View GitHub Profile
@maixuanhan
maixuanhan / CharlietheDog.cpp
Created May 8, 2023 07:48
Giải bài CharlietheDog bằng sinh hoán vị
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
#define MAX 1000 // cost will never reach this value
struct POSITION
@maixuanhan
maixuanhan / install-ubuntu-server-via-console.md
Last active April 6, 2023 06:41
Install Ubuntu server 18.04 via USB disk and serial console
1. Execute make first. This will result in a netlinkKernel.ko output among many others.
2. Execute $ gcc netlinkUser.c -o netlinkUser
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko
4. Run ./netlinkUser to see message and run dmesg to see debug messages
5. Remove module by : $ sudo rmmod netlinkKernel
6. Finally make clean to remove output files.
@maixuanhan
maixuanhan / problem1.cpp
Created April 5, 2018 03:00
Word count problem
// mxhan
// Problem 1: word counting
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
using namespace std;