Skip to content

Instantly share code, notes, and snippets.

@minh0722
minh0722 / far.config
Last active December 24, 2024 19:41
Configuration for Far Manager
<?xml version="1.0" encoding="UTF-8"?>
<farconfig version="3.0.6364">
<generalconfig>
<setting key="Cmdline" name="AutoComplete" type="qword" value="0000000000000001"/>
<setting key="Cmdline" name="DelRemovesBlocks" type="qword" value="0000000000000001"/>
<setting key="Cmdline" name="EditBlock" type="qword" value="0000000000000000"/>
<setting key="Cmdline" name="PromptFormat" type="text" value="$p$g"/>
<setting key="Cmdline" name="UsePromptFormat" type="qword" value="0000000000000000"/>
<setting key="CodePages" name="CPMenuMode" type="qword" value="0000000000000000"/>
<setting key="CodePages" name="NoAutoDetectCP" type="text" value=""/>
@minh0722
minh0722 / compiling_building_c_cpp_notes.md
Created February 19, 2021 16:12 — forked from gubatron/compiling_building_c_cpp_notes.md
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015; August 29, 2019.

Include Paths

On the compilation phase, you will usually need to specify the different include paths so that the interfaces (.h, .hpp) which define structs, classes, constans, and functions can be found.

With gcc and llvm include paths are passed with -I/path/to/includes, you can pass as many -I as you need.

In Windows, cl.exe takes include paths with the following syntax: /I"c:\path\to\includes\ you can also pass as many as you need.

@minh0722
minh0722 / converter.bat
Created March 5, 2019 22:18
Convert flac to alac, keeping metadata
for %f in (*.flac) do
(
ffmpeg -i "%f" -c:a alac "F:\Music\Final Fantasy\Piano Collection - Final Fantasy X-2\%~nf.m4a"
)
@minh0722
minh0722 / thread_id2.cpp
Created January 17, 2019 16:19 — forked from drodil/thread_id2.cpp
C++ human-readable thread id
#include <thread>
#include <atomic>
std::size_t get_thread_id() noexcept {
static std::atomic<std::size_t> thread_idx{0};
thread_local std::size_t id = thread_idx;
thread_idx++;
return id;
}
@minh0722
minh0722 / Data_oriented_example.cpp
Created March 17, 2016 14:46 — forked from stoyannk/Data_oriented_example.cpp
Sample that shows different approaces in the desing of a problem. For the HPC course in FMI 2015.
// Data-oriented variant for drawing moving shapes
struct Positions
{
unsigned Count;
float* Xs; // Simplify SIMD-ification
float* Ys;
};
struct ShapePositions
@minh0722
minh0722 / sublime_text_2_useful_shortcuts.md
Last active August 29, 2015 14:25 — forked from nuxlli/sublime_text_2_useful_shortcuts.md
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods