create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
function [maxtab, mintab]=peakdet(v, delta, x) | |
%PEAKDET Detect peaks in a vector | |
% [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local | |
% maxima and minima ("peaks") in the vector V. | |
% MAXTAB and MINTAB consists of two columns. Column 1 | |
% contains indices in V, and column 2 the found values. | |
% | |
% With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices | |
% in MAXTAB and MINTAB are replaced with the corresponding | |
% X-values. |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
# from http://stackoverflow.com/questions/4103773/efficient-way-of-having-a-function-only-execute-once-in-a-loop | |
from functools import wraps | |
def run_once(f): | |
"""Runs a function (successfully) only once. | |
The running can be reset by setting the `has_run` attribute to False | |
""" | |
@wraps(f) | |
def wrapper(*args, **kwargs): | |
if not wrapper.has_run: |
This article is now published on my website: A one-off git repo server.
#include <iostream> | |
#include <cuda_runtime.h> | |
#include <device_launch_parameters.h> | |
// GTS450 sm_21 | |
#define NUM_SM 4 // no. of streaming multiprocessors | |
#define NUM_WARP_PER_SM 48 // maximum no. of resident warps per SM | |
#define NUM_BLOCK_PER_SM 8 // maximum no. of resident blocks per SM | |
#define NUM_BLOCK NUM_SM * NUM_BLOCK_PER_SM | |
#define NUM_WARP_PER_BLOCK NUM_WARP_PER_SM / NUM_BLOCK_PER_SM |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
# Batch convert all .ppt/.pptx files encountered in folder and all its subfolders | |
# The produced PDF files are stored in the invocation folder | |
# | |
# Adapted from http://stackoverflow.com/questions/16534292/basic-powershell-batch-convert-word-docx-to-pdf | |
# Thanks to MFT, takabanana, ComFreek | |
# | |
# If PowerShell exits with an error, check if unsigned scripts are allowed in your system. | |
# You can allow them by calling PowerShell as an Administrator and typing | |
# ``` | |
# Set-ExecutionPolicy Unrestricted |
(In this document I pay attention mostly to data storage in scientific applications, not to web protocols.)