Skip to content

Instantly share code, notes, and snippets.

View itsdmd's full-sized avatar
📚

Đức Đào itsdmd

📚
  • VNUHCM - University of Science
  • Vietnam
  • 20:16 (UTC +07:00)
  • LinkedIn in/itsdmd
View GitHub Profile
@itsdmd
itsdmd / tetris.bat
Created September 14, 2021 12:43 — forked from Hoffs/tetris.bat
Tetris in batch
@echo off
color 4F
title Tetris by
setlocal enabledelayedexpansion
mode con: cols=32 lines=35
set "hashBar=############"
set "ESpace= "
set "LowestYFig=1"
@itsdmd
itsdmd / CMakeLists.txt
Last active February 22, 2022 03:46
CMakeList template for testing .cpp modules
# Download & Install CMake: certutil.exe -urlcache -split -f "https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-windows-x86_64.msi" cmake.msi && msiexec /i "cmake.msi"
# Initiate with: cmake -S . -B build && cmake --build build && cd build && ctest & cd ..
cmake_minimum_required(VERSION 3.14)
project(my_project)
# GoogleTest requires at least C++20
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
@itsdmd
itsdmd / Reverse color browser PDF
Created December 26, 2021 13:33
Ctrl + Shift + I -> Console tab
var cover = document.createElement("div");
let css = `
position: fixed;
pointer-events: none;
top: 0;
@itsdmd
itsdmd / d_ascii_art
Last active February 22, 2022 03:40
ASCII art file for neofetch. 4 = Blue, 6 = White.
${c4}.----------------.
| .--------------. |
| | ${c6}________ ${c4}| | _____ _ _
| | ${c6}|_ ___ `. ${c4}| | |_ _|__ _ __ _ __ ___ (_)_ __ __ _| |
| | ${c6}| | `. \ ${c4}| | | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | |
| | ${c6}| | | | ${c4}| | | | __/ | | | | | | | | | | | (_| | |
| | ${c6}_| |___.´ / ${c4}| | |_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|
| | ${c6}|________.´ ${c4}| | __________________________________________
@itsdmd
itsdmd / Carl
Last active March 1, 2022 13:53
Color Paletes
#: black
color0 #434343
color8 #5e5e5e
#: red
color1 #f13460
color9 #fd3e71
@itsdmd
itsdmd / Carl
Last active March 1, 2022 13:53
VS Code Terminal Themes
"workbench.colorCustomizations": {
"terminal.ansiBlack": "#434343",
"terminal.ansiBrightBlack": "#5e5e5e",
"terminal.ansiRed": "#fd3762",
"terminal.ansiBrightRed": "#fd3762",
"terminal.ansiGreen": "#279f9d",
"terminal.ansiBrightGreen": "#2db9b7",
"terminal.ansiYellow": "#e82d91"
"terminal.ansiBrightYellow": "#ff3da4",
"terminal.ansiBlue": "#3770eb",
@itsdmd
itsdmd / CMakeLists.txt
Created February 22, 2022 03:50 — forked from dlime/CMakeLists.txt
Install Google Test and Google Mock on Ubuntu
cmake_minimum_required(VERSION 3.5)
project(example LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
@itsdmd
itsdmd / repo_reset.md
Last active April 29, 2022 14:15 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@itsdmd
itsdmd / change_cm.txt
Last active March 15, 2022 06:03
Git Change CM
git rebase -i HEAD~2
pick e499d89 Delete CNAME
reword 0c39034 Better README
git push --force origin example-branch
@itsdmd
itsdmd / gnome_kb_exp.sh
Last active April 30, 2022 09:24
Scripts for backuping/restoring GNOME keybinding setting
#!/bin/bash
dconf dump /org/gnome/settings-daemon/plugins/media-keys/ > dump_1
dconf dump /org/gnome/desktop/wm/keybindings/ > dump_2
dconf dump /org/gnome/shell/keybindings/ > dump_3
dconf dump /org/gnome/mutter/keybindings/ > dump_4
dconf dump /org/gnome/mutter/wayland/keybindings/ > dump_5