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
#!/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 / vim.ahk
Last active November 12, 2020 09:07
vim like arrows & move functions
;###############################################
;Disable CapsLock
;###############################################
CapsLock::
SetCapslockState, Alwaysoff
return
;###############################################
;Control + CapsLock -> CapsLock
;###############################################
@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
@LazyRen
LazyRen / lock_free_bounded_queue.cpp
Created December 4, 2019 15:29
Implementation of simple lock free bounded queue in C++
#include <atomic>
#include <chrono>
#include <cinttypes>
#include <cstdio>
#include <thread>
using namespace std;
#define NUM_PRODUCER 4
#define NUM_CONSUMER NUM_PRODUCER
#define NUM_THREADS (NUM_PRODUCER + NUM_CONSUMER)
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
[
{
"keys": ["super+i"],
"command": "unexpand_tabs",
"args": { "set_translate_tabs": true }
},
//open finder
{
"keys": ["super+shift+x"],
{
"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++",
}