Skip to content

Instantly share code, notes, and snippets.

@Ation
Ation / run.tpl
Created August 6, 2023 13:28 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@Ation
Ation / gist:a21eac7cb0832e35cd1034eaf473dc3c
Created July 25, 2023 13:57
Sample build project in sublime
{
"build_systems":
[
{
"cmd":
[
"make",
"-j",
"6"
],
@Ation
Ation / sublime_package_list
Last active August 1, 2022 12:11
Sublime packages list
AdvancedNewFile
All Autocomplete
Auto Docstring
C++11
Cmake
Dockerfile syntax highlighter
TrailingSpaces
TOML
String Utilities
SideBarEnchancements
@Ation
Ation / start_ssh_agent.sh
Created March 10, 2020 10:38
ssh-agent start
ssh-add -l &>/dev/null
if [ "$?" == 2 ]; then
test -r ~/.ssh-agent && \
eval "$(<~/.ssh-agent)" >/dev/null
ssh-add -l &>/dev/null
if [ "$?" == 2 ]; then
(umask 066; ssh-agent > ~/.ssh-agent)
eval "$(<~/.ssh-agent)" >/dev/null
ssh-add
{
"always_prompt_for_file_reload": true,
"binary_file_patterns":
[
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
"*.ico",
"*.eot",
@Ation
Ation / git_configs.sh
Last active February 19, 2020 07:47
My git configs
#!/bin/bash
#common configs
#aliases
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.su "submodule update --recursive"
#other
git config --global push.default current
@Ation
Ation / sublime_hotkeys.json
Last active April 27, 2020 13:01
Sublime hotkeys OSX + Windows
[
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
{ "keys": ["super+."], "command": "next_bookmark" },
{ "keys": ["super+,"], "command": "prev_bookmark" },
{ "keys": ["alt+super+/"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+super+left"], "command": "jump_back" },
{ "keys": ["ctrl+super+right"], "command": "jump_forward" },
{ "keys": ["super+shift+e"], "command": "enumerate" },
{ "keys": ["super+escape"], "command": "show_panel", "args": { "panel": "output.exec" }
}
<snippet>
<content><![CDATA[
public:
${1}();
~${1}() noexcept;
${1}(const ${1}&) = delete;
${1}& operator = (const ${1}&) = delete;
${1}(${1}&&) = delete;
@Ation
Ation / header.sublime-snippet
Created March 17, 2019 13:52
Header sublie snippet
<snippet>
<content><![CDATA[
#ifndef ${1}
#define ${1}
${2}
#endif // ${1}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
@Ation
Ation / gist:dede01da9e8f705049dbfb34ee9e71de
Created October 17, 2018 09:24
install ccache ubuntu
# Install package
sudo apt install -y ccache
# Update symlinks
sudo /usr/sbin/update-ccache-symlinks
# Prepend ccache into the PATH
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
# Source bashrc to test the new PATH