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 / c_cmd.sh
Created August 23, 2018 20:55
mac sublime-text c build&execute shell script
#!/bin/sh
osascript -e '
on run parameters
set TID to text item delimiters
set text item delimiters to " "
set myfile to parameters as text
set text item delimiters to TID
tell application "Finder"
set fileName to name of (POSIX file myfile as alias)
set filePath to do shell script ("dirname " & quoted form of myfile)
@LazyRen
LazyRen / cpp_cmd.sh
Created August 23, 2018 20:56
mac sublime-text c++ build&execute shell script
#!/bin/sh
osascript -e '
on run parameters
set TID to text item delimiters
set text item delimiters to " "
set myfile to parameters as text
set text item delimiters to TID
tell application "Finder"
set fileName to name of (POSIX file myfile as alias)
set filePath to do shell script ("dirname " & quoted form of myfile)
@LazyRen
LazyRen / python_cmd.sh
Created August 23, 2018 20:56
mac sublime-text python build&execute shell script
#!/bin/sh
osascript -e '
on run parameters
set TID to text item delimiters
set text item delimiters to " "
set myfile to parameters as text
set text item delimiters to TID
tell application "Finder"
set fileName to name of (POSIX file myfile as alias)
set filePath to do shell script ("dirname " & quoted form of myfile)
@LazyRen
LazyRen / C cmd.sublime-build
Created August 23, 2018 21:00
mac sublime build system code. Use with matching .sh file!
{
"shell_cmd": "gcc ${file_name} -o ${file_base_name}.out && sh /Users/LazyRen/Documents/Programming/c_cmd.sh \"${file}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c"
}
@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++",
}
@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"}
}
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
"*.ico",
"*.jar",
"*.jpeg",
[
{
"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":