Skip to content

Instantly share code, notes, and snippets.

View shuxiao9058's full-sized avatar
🎯
Focusing

Aaron Ji shuxiao9058

🎯
Focusing
View GitHub Profile
@shuxiao9058
shuxiao9058 / Microsoft.Cpp.Win32.user
Created August 24, 2014 06:06
Microsoft.Cpp.Win32.user,路径:C:\Users\jiya\AppData\Local\Microsoft\MSBuild\v4.0
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ExecutablePath>C:\Program Files (x86)\OpenCV\vc10\bin;$(ExecutablePath)</ExecutablePath>
<IncludePath>C:\Program Files (x86)\OpenCV\include;$(IncludePath)</IncludePath>
<ReferencePath>$(ReferencePath)</ReferencePath>
<LibraryPath>C:\Program Files (x86)\OpenCV\vc10\lib;$(LibraryPath)</LibraryPath>
<SourcePath>$(SourcePath)</SourcePath>
<ExcludePath>$(ExcludePath)</ExcludePath>
</PropertyGroup>
@shuxiao9058
shuxiao9058 / gcMakefile
Created August 24, 2014 14:01
generic makefile
ifeq ($(OS),Windows_NT)
CC="C:\Program Files (x86)\Dev-Cpp\MinGW32\bin\gcc"
CXX="C:\Program Files (x86)\Dev-Cpp\MinGW32\bin\g++"
SHIT=\\
DEL=del
INCS=-I./inc -I"C:/Program Files (x86)/opencv/include"
LIBS=-L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -L"C:/Program Files (x86)/opencv/mingw/lib"
CFLAGS=
LDFLAGS=-lopencv_calib3d241 -lopencv_contrib241 -lopencv_core241 -lopencv_features2d241 -lopencv_flann241 -lopencv_gpu241 -lopencv_highgui241 -lopencv_imgproc241 -lopencv_legacy241 -lopencv_ml241 -lopencv_nonfree241 -lopencv_objdetect241 -lopencv_photo241 -lopencv_stitching241 -lopencv_ts241 -lopencv_video241 -lopencv_videostab241
@shuxiao9058
shuxiao9058 / Makefile
Created August 25, 2014 14:05
cross-platform compile libjpeg
CC=arm-linux-gcc
CXX=arm-linux-g++
LIBCOMMAND = arm-linux-ar cr
RANLIB = arm-linux-ranlib
%.o:%.c
$(CC) -c -o $@ $<
%.o:%.C
$(CC) -c -o $@ $<
@shuxiao9058
shuxiao9058 / libjpeg-turbo-demo.c
Created August 27, 2014 15:38
save jpg file with libjpeg-tubo
#include <string.h>
#include <stdio.h>
#include "libjpeg-turbo/turbojpeg.h"
#pragma comment(lib, "turbojpeg.lib")
bool savejpg(const char* filename,const unsigned char* pData,int width,int height, int nchannels);
int main(int argc, char **argv)
{
@shuxiao9058
shuxiao9058 / autossh.exp
Created March 1, 2015 07:05
ssh autologin script
#!/usr/bin/expect -f
# ./autossh.exp user password 192.168.199.1
set user [lrange $argv 0 0]
set password [lrange $argv 1 1]
set host [lrange $argv 2 2]
spawn ssh $user@$host
match_max 100000
expect {
@shuxiao9058
shuxiao9058 / Makefile.golang
Created October 7, 2015 16:23 — forked from dnishimura/Makefile.golang
Makefile for Golang projects
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@shuxiao9058
shuxiao9058 / README.md
Created September 19, 2016 13:47 — forked from doitian/README.md
Scripts to control Vitamin-R

Usage

osascript Start.applescript "objective" "tag1,tag2"
osascript Stop.applescript

I have skipped most Vitamin-R workflows. See the attached settings snapshot. If you have them enabled, you need to update the script to handle different steps.

I use the scripts in my org pomodoro script

@shuxiao9058
shuxiao9058 / README.md
Created November 21, 2016 07:58 — forked from e7d/README.md
[Debian] Build a Squid transparent proxy from source code
@shuxiao9058
shuxiao9058 / EmacsKeyBinding.dict
Created November 27, 2016 07:32 — forked from jwreagor/EmacsKeyBinding.dict
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@shuxiao9058
shuxiao9058 / Mount TimeCapsule on RaspberryPi
Created December 25, 2016 14:19 — forked from Gr1N/Mount TimeCapsule on RaspberryPi
Mount TimeCapsule on RaspberryPi
# Install dependencies
% apt-get install cifs-utils
# Create mount point folder
% mkdir /mnt/capsule
# Create credentials file
% touch /root/.cifs/capsule
% cat /root/.cifs/capsule
username=username