This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"color_scheme": "Packages/Colorcoder/Monokai (Colorcoded).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Edlo", | |
"font_size": 12, | |
"gutter": true, | |
"highlight_modified_tabs": true, | |
"indent_guide_options": | |
[ | |
"draw_normal", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string strprintf(const char * __restrict, va_list) __printflike(1, 0); | |
std::string strprintf(const char * __restrict, ...) __printflike(1, 2); | |
std::string strprintf(const char* format, va_list vlist) | |
{ | |
#if 1 | |
char* buff = nullptr; | |
int ret = vasprintf(&buff, format, vlist); | |
ASSERT(ret >= 0); | |
std::string str = buff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" C++ linter using libclang. Call with [filenames] """ | |
from __future__ import print_function | |
from clang.cindex import Config, TypeKind, CursorKind, Index | |
from pprint import pprint | |
import platform | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Emil Ernerfeldt on 2013-01-24. | |
// Cleaned up 2016-01-28. | |
#pragma once | |
#include <atomic> | |
#include <condition_variable> | |
#include <mutex> | |
#include <thread> | |
namespace util { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"working_dir": "${project_path:${folder}}", | |
"shell_cmd": "xcodebuild -project *.xcodeproj", | |
"file_regex": "^(.*):([0-9]*):[0-9]*:[fatal ]+error: ", | |
"selector": "source.c++", | |
"variants": [ | |
{ | |
"name": "Build & Run", | |
"working_dir": "${project_path:${folder}}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Log your activity. View with tail log.txt | |
echo $(date +"%Y-%m-%d %H:%M:%S") $@ >> ~/log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The first 10 bytes of message.preamble is the current date in YYYY-MM-DD. | |
#define DATE_LEN 10 | |
struct DailyLogger | |
{ | |
FILE* file = nullptr; | |
char date[DATE_LEN] = { 0 }; | |
}; | |
void daily_log(void* user_data, const loguru::Message& message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dd if=/dev/zero of=/root/myswapfile bs=1M count=65536 | |
sudo chmod 600 /root/myswapfile | |
sudo mkswap /root/myswapfile | |
sudo swapon /root/myswapfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"shell_cmd": "./build_and_run.sh", | |
"working_dir": "${project_path:${folder}}", | |
"file_regex": ".*?([^\\s]+?\\.[a-z]+?)\\b.\\b([0-9]+).*", | |
"selector": "source.rs4", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"file_regex": "([^\\s@]*?):([0-9]+):([0-9]+)(.*)$", | |
"selector": "source.rust", | |
"shell_cmd": "cargo check --lib --all-features", | |
"working_dir": "${project_path}", | |
} |
OlderNewer