Skip to content

Instantly share code, notes, and snippets.

@improve100
improve100 / cudaMallocBench.cu
Created January 4, 2023 09:28 — forked from sonots/cudaMallocBench.cu
Benchmark of cudaMalloc. Allocate 1MB of memory totally with several block sizes
#include <sys/time.h>
#include <cuda_runtime.h>
#include <stdio.h>
inline double seconds()
{
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp, &tzp);
return ((double)tp.tv_sec + (double)tp.tv_usec * 1.e-6);
[global_config]
title_hide_sizetext = True
title_transmit_bg_color = "#ededed"
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
title_transmit_fg_color = "#080808"
title_inactive_bg_color = "#ededed"
[keybindings]
[profiles]
[[default]]
use_system_font = False
@improve100
improve100 / terminator.config
Created August 2, 2021 14:07 — forked from tinybike/terminator.config
~/.config/terminator/config
[global_config]
suppress_multiple_term_dialog = True
title_transmit_bg_color = "#c00909"
[keybindings]
[layouts]
[[default]]
[[[child0]]]
fullscreen = False
last_active_term = f6492e56-7053-4ce3-8780-d71bd7ae0843
last_active_window = True
@improve100
improve100 / .el
Created November 1, 2020 06:44 — forked from cjp/.el
How to get org-protocol to work with spacemacs
;; I have no idea why it works. This is the product of 4 hours of trial-and-error.
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init'. You are free to put almost
any user code here. The exception is org related code, which should be placed
in `dotspacemacs/user-config'."
(server-start)
(require 'org-protocol)
)
@improve100
improve100 / spacemacs-keybindings.md
Created October 28, 2020 14:50 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn
@improve100
improve100 / pr.md
Created September 29, 2018 01:37 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@improve100
improve100 / tmux-cheatsheet.markdown
Created August 24, 2018 07:33 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@improve100
improve100 / opencv-3-installation 多版本
Last active August 24, 2018 07:17 — forked from bikz05/opencv-3-installation
OpenCV 3 Installation 多版本
# Added by me
sudo apt-get install freeglut3 freeglut3-dev libtbb-dev libqt4-dev
# install deps
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libatlas-base-dev gfortran
# clone opencv source
mkdir softwares
@improve100
improve100 / Install PyQt5 on Ubuntu with python3 .md
Created August 8, 2018 09:01 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@improve100
improve100 / basecommand_emacs
Created August 6, 2018 08:31 — forked from shijinkui/basecommand_emacs
Emacs常用基本快捷键
/************************************/
基本命令
C-x C-f 打开/新建文件
C-x C-s 保存当前缓冲区
C-x C-w 当前缓冲区另存为
C-x C-v 关闭当前Buffer并打开新文件
C-x i 光标处插入文件
C-x b 切换Buffer
C-x C-b 显示Buffer列表
C-x k 关闭当前Buffer