Skip to content

Instantly share code, notes, and snippets.

View murphypei's full-sized avatar

Octocat murphypei

View GitHub Profile
@murphypei
murphypei / c_cpp_header.code-snippets
Created February 10, 2022 03:34
vscode 自动生成 C++ 头
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
@murphypei
murphypei / asr_fbank_mfcc.ipynb
Created October 13, 2021 10:32
ASR FBANK MFCC 特征提取
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@murphypei
murphypei / clion.desktop
Created October 8, 2021 02:06
ubuntu 创建 clion 快捷方式
# sudo vim /usr/share/applications/clion.desktop
[Desktop Entry]
Encoding=UTF-8
Name=CLion
Comment=clion-2021.2.1
Exec=/opt/clion/clion-2021.2.1/bin/clion.sh
@murphypei
murphypei / windows_terminal_settings.json
Last active June 8, 2021 07:30
windows terminal setting
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"colorScheme": "",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"disabledProfileSources": [
"Windows.Terminal.Azure"
],
// 终端窗口默认大小
@murphypei
murphypei / ubuntu_setup.sh
Last active June 6, 2022 09:06
ubuntu dev env setup
#!/bin/bash
set -e
set -x
function install_zsh() {
sudo apt update
sudo apt install -y zsh curl
sudo usermod -s /bin/zsh $(whoami)
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@murphypei
murphypei / auto_memory.h
Created April 16, 2020 12:41
C++ auto align memory manage
#ifndef AUTO_MEMORY_H_
#define AUTO_MEMORY_H_
#include <cassert>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(_MSC_VER) // windows
@murphypei
murphypei / auto_time.cpp
Last active April 27, 2020 03:36
C++ auto time
#include "auto_time.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(WINDOWS)
#include <Windows.h>
#else
#include <sys/time.h>
#endif
@murphypei
murphypei / safe_queue.h
Last active August 16, 2023 17:28
C++ thread safe queue
#ifndef SAFE_QUEUE
#define SAFE_QUEUE
#include <condition_variable>
#include <mutex>
#include <queue>
// A threadsafe-queue.
template <class T>
class SafeQueue
@murphypei
murphypei / log_kit.h
Last active April 16, 2020 12:42
C++ log kit
//
// logkit.h
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef LOGKIT_H
#define LOGKIT_H
@murphypei
murphypei / style.xml
Last active July 25, 2020 06:50
clion c++ style
<code_scheme name="Project" version="173">
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0" />
<option name="NAMESPACE_BRACE_PLACEMENT" value="5" />
<option name="FUNCTION_BRACE_PLACEMENT" value="5" />
<option name="BLOCK_BRACE_PLACEMENT" value="5" />
<option name="LAMBDA_CAPTURE_LIST_WRAP" value="1" />
<option name="INSERT_VIRTUAL_WITH_OVERRIDE" value="true" />
</Objective-C>
<Objective-C-extensions>