Skip to content

Instantly share code, notes, and snippets.

View LazyRen's full-sized avatar
🇰🇷
Work Hard to be Lazy

Lee, DaeIn LazyRen

🇰🇷
Work Hard to be Lazy
View GitHub Profile
@LazyRen
LazyRen / queue.cpp
Created May 24, 2020 15:03
STL queue-like data structure implementation
template <typename T>
class Queue {
private:
using size_type = size_t;
T* arr;
size_type head;
size_type tail;
size_type _size;
size_type _capacity;
static constexpr size_type DEFAULT_CAP = 4;
@LazyRen
LazyRen / pair.cpp
Last active May 24, 2020 15:02
STL pair-like data structure
template <typename T1, typename T2>
class Pair{
public:
T1 first;
T2 second;
constexpr Pair() : first(T1()), second(T2()) {};
Pair(const T1& f, const T2& s) : first(f), second(s) {};
#!/bin/bash
FILE_NAME=${1?Error: No file name found}
echo g++ -o "${FILE_NAME}".exe "${FILE_NAME}".cpp ${@:2}
g++ -o "${FILE_NAME}".exe "${FILE_NAME}".cpp ${@:2}
@LazyRen
LazyRen / windows_dev_settings.txt
Last active April 9, 2020 10:37
Windows Development Settings (MSYS2 & hyper)
// Visual Studio Code
https://code.visualstudio.com/Download
// download 'Settings Sync' extension
// in settings.json (for MSYS2 & Hyper)
"terminal.external.windowsExec": "C:\\Users\\LazyRen\\AppData\\Local\\hyper\\Hyper.exe",
"terminal.integrated.shell.windows": "C:\\msys64\\msys2_shell.cmd",
"terminal.integrated.shellArgs.windows": ["-mingw64", "-defterm", "-no-start", "-full-path"],
"terminal.integrated.env.windows": {"HOME": "C:\\Users\\LazyRen\\dev"},
// Git
[
{
"keys": ["super+i"],
"command": "unexpand_tabs",
"args": { "set_translate_tabs": true }
},
//open finder
{
"keys": ["super+shift+x"],
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
"*.ico",
"*.jar",
"*.jpeg",
@LazyRen
LazyRen / Python cmd.sublime-build
Created August 23, 2018 21:01
mac sublime build system code. Use with matching .sh file!
{
"shell_cmd": "sh /Users/lazyren/Documents/Programming/python_cmd.sh \"${file}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"}
}
@LazyRen
LazyRen / C++ cmd.sublime-build
Created August 23, 2018 21:00
mac sublime build system code. Use with matching .sh file!
{
"shell_cmd": "g++ -std=c++14 ${file_name} -o ${file_base_name}.out && sh /Users/lazyren/Documents/Programming/cpp_cmd.sh \"${file}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c++",
}