Skip to content

Instantly share code, notes, and snippets.

View ctnguyenvn's full-sized avatar

Cong Tru Nguyen ctnguyenvn

View GitHub Profile
@ctnguyenvn
ctnguyenvn / boost-CMakeList.md
Last active March 11, 2021 12:42
add boost lib to CMakeList.txt

add config below to CMakeList.txt

  • Change ON|OFF to enable/disable boost lib
  • Change version 1.75 to your boost version
  • Change progname to your programe name
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
@ctnguyenvn
ctnguyenvn / .jsbeautifyrc
Last active December 1, 2020 14:50
Sync Setting for sublime text 3
{
}
@ctnguyenvn
ctnguyenvn / dec2bin.c
Created July 23, 2019 21:04
dec to binary
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
// function reverse string instead of strrev (strrev not exist in linux)
char *rev_string(char *str)
{
int start = 0;
int end = strlen(str) - 1;
char tmp;
@ctnguyenvn
ctnguyenvn / CMakeLists.txt
Last active March 1, 2019 19:41
template simple gtk cmake C on Clion Linux
cmake_minimum_required(VERSION 3.7)
project(First C) // First -> project name
include(FindPkgConfig)
pkg_check_modules(GTK REQUIRED "gtk+-3.0")
include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})
@ctnguyenvn
ctnguyenvn / blog-FindKeyXorFile.py
Created September 30, 2018 18:14
challenge ransomware file decode D-CTF
#!/usr/bin/python3
import string
import sys
index = int(sys.argv[1])
char = str(sys.argv[2])
allp = string.ascii_letters + string.punctuation + string.digits
file = open('youfool.exe', 'rb').read()
@ctnguyenvn
ctnguyenvn / blog-ransom.py
Created September 30, 2018 03:17
challenge ransomware file decode D-CTF
import string
from random import *
import itertools
def caesar_cipher(x, y):
y = y * (len(x) / len(y) + 1)
return ('').join((chr(ord(a) ^ ord(b)) for a, b in itertools.izip(x, y)))
@ctnguyenvn
ctnguyenvn / gist:56a6dba6f2bdb3dc11ec5018a0138d72
Created May 6, 2018 14:59 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: