Skip to content

Instantly share code, notes, and snippets.

View zchen24's full-sized avatar

Zihan Chen zchen24

  • Cornerstone Robotics Limited
View GitHub Profile
@gocarlos
gocarlos / Eigen Cheat sheet
Last active February 11, 2024 14:07
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@yohhoy
yohhoy / cv2ff.cpp
Created February 17, 2016 15:41
Convert from OpenCV image and write movie with FFmpeg
/*
* Convert from OpenCV image and write movie with FFmpeg
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
#!/usr/bin/env perl
use Term::ANSIColor;
if(@ARGV < 1) {
print " \n";
print "usage: $0 USERNAMES [--admin]\n";
print " \n";
print " This program will create a user using 'adduser' for each username\n";
print " listed in the USERNAMES file (separated by line breaks). Their\n";
@weynhamz
weynhamz / config
Last active July 6, 2022 13:33
i3-wm configuration
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
#####
#
# Fonts
#
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 24, 2024 12:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname