Skip to content

Instantly share code, notes, and snippets.

sandyUni /
Last active May 23, 2024 02:33
# setup XTDRONE with gitee connection
# this script assumes you already have ros and gazebo installed
# for more infomation, please refers to and
set -x
sudo apt-get install -y ninja-build exiftool python-argparse python-empy python-toml python-numpy python-yaml python-dev python-pip ninja-build protobuf-compiler libeigen3-dev genromfs xmlstarlet libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
pip2 install pandas jinja2 pyserial cerberus pyulog numpy toml pyquaternion
pip3 install packaging numpy empy toml pyyaml jinja2
sudo apt-get install git build-essential
sandyUni /
Last active November 20, 2018 01:43 — forked from huacnlee/
Upgrade GCC 4.9 on Ubuntu Server
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
# if you are embeded arm system, try use the following states
# sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-4.9 60 --slave /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-4.9
sandyUni /
Created December 7, 2017 08:08
tslagame network usage inspector
import os
import psutil
import re
def find_procs_by_name(name):
"Return a list of processes matching 'name'."
assert name, name
ls = []
for p in psutil.process_iter():
name_, exe, cmdline = "", "", []
--- src/openvpn/options.c.orig 2012-12-17 17:36:07.000000000 +0800
+++ src/openvpn/options.c 2013-03-07 23:21:26.230153027 +0800
@@ -62,6 +62,10 @@
#include "memdbg.h"
+extern char* _socket_obfs_salt;
+extern int _socket_obfs_salt_len;
+extern int _socket_obfs_padlen;
sandyUni / LLA2ECEF.matlab
Created June 13, 2017 06:38 — forked from klucar/ECEF2LLA.matlab
LLA2ECEF matlab
% LLA2ECEF - convert latitude, longitude, and altitude to
% earth-centered, earth-fixed (ECEF) cartesian
% [x,y,z] = lla2ecef(lat,lon,alt)
% x = ECEF X-coordinate (m)
% y = ECEF Y-coordinate (m)
% z = ECEF Z-coordinate (m)
% lat = geodetic latitude (radians)
sandyUni /
Created June 1, 2017 03:27
setup communication node
# setup augmavconn and libmavconn environment
# Author Lai Jun, <>
# 2017.5.21
echo "Current folder: $p"
sandyUni /
Last active April 10, 2017 02:05
automatically P900 work mode set
# -*- code: utf-8 -*-
import subprocess as sub
import serial
from import comports
import re
import time
import sys
def searchAllSerialPorts():
sandyUni /
Last active October 20, 2020 07:22
An pdf merge tool to auto remove annotations and merge papers
# -*- coding:utf-8 -*-
An pdf merge tool to auto remove annotations and merge papers
1. Export biblatex with attachment files throgh Zotero(
2. cd to the export root folder, and excute the command ` -t yourtitle`
0.python version: tested with 3.7.3, win64
function [str] = timestrForFile( num )
% generate a timestamp for file
% this time stamp has eliminated charactors forbidden in filename
% num is a num for time stamp, now is the default.
if nargin==0
num = now;
import numpy as np
def cartesian(arrays, out=None):
Generate a cartesian product of input arrays.
arrays : list of array-like
1-D arrays to form the cartesian product of.