Skip to content

Instantly share code, notes, and snippets.

View jacknlliu's full-sized avatar

Jack Liu jacknlliu

  • State Key Laboratory of Robotics
  • China
View GitHub Profile
@jacknlliu
jacknlliu / emacs-auctex-config.el
Created September 29, 2015 02:52 — forked from pkazmierczak/emacs-auctex-config.el
This is a Gist that contains all the code snippets from my blogpost about Emacs for LaTeX configuration: http://piotrkazmierczak.com/2010/05/13/emacs-as-the-ultimate-latex-editor/
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-save-query nil)
;(setq TeX-PDF-mode t)
(require 'flymake)
(defun flymake-get-tex-args (file-name)
(list "pdflatex"
(list "-file-line-error" "-draftmode" "-interaction=nonstopmode" file-name)))
@jacknlliu
jacknlliu / xprofile.md
Created October 4, 2015 14:02 — forked from marbu/xprofile.md
searching for xprofile

xprofile file

Raw notes about ~/.xprofile script.

Upstream

Upstream DM which executes ~/.xprofile file in Xsession script:

  • GDM (Gnome): see Xsession.in
  • KDM (KDE 4): see genkdmconf.c
@jacknlliu
jacknlliu / BibTeXKeyOnly.js
Created October 7, 2015 15:00 — forked from spartanroc/BibTeXKeyOnly.js
New Features and Improvements on Zotero's Support of BibTeX Export
{
"translatorID": "12345",
"label": "BibTeX CiteKey-only Exporter",
"creator": "Simon Kornblith and Richard Karnesky with tweaks by Tan",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 200,
"inRepository": false,
"translatorType": 3,
@jacknlliu
jacknlliu / bbb_boot_service_instructions.md
Created March 10, 2016 04:10 — forked from tstellanova/bbb_boot_service_instructions.md
How to setup a service to automatically run a python script when the BeagleBone Black (BBB) reboots. These instructions allow you to setup a python script to automatically start when the BeagleBone (running Angstrom linux with systemd) restarts.

Creating a service to startup at BeagleBone Black boot time:

  • Create a shell script such as /usr/bin/myFancyBash.sh:

      #!/bin/bash
    
      # this could be any runnable code or shell script, really
      /usr/bin/myFancyPython.py 
    

Note that the first line is critical.

@jacknlliu
jacknlliu / pandocslides-README.md
Created July 31, 2016 09:08
A Pandoc template to generate reveal.js slideshows.

Description

This is a Pandoc template to generate reveal.js slideshows.

Definitions

Pandoc is a "universal markup converter" you can run from the command line to convert a simple, plain text file into a beautifully formatted PDF, .docx, HTML, LaTeX, slideshows… the list goes on.

reveal.js is a CSS and JavaScript framework for creating beautiful presentations in HTML5, designed by Hakim El Hattab.

@jacknlliu
jacknlliu / env-Dockerfile
Last active May 7, 2024 11:57
use variable "DEBIAN_FRONTEND noninteractive" to apt-get noninteractive install and set environment and use shell script in Dockerfile
ENV QT_BASE_DIR=/opt/qt55
ENV QTDIR=$QT_BASE_DIR
ENV PATH=$QT_BASE_DIR/bin:$PATH
ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
# Reconfigure locale
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
# Docker offical ENVIRONMETN REPLACEMENT
@jacknlliu
jacknlliu / listener.cpp
Created October 16, 2016 06:15
ROS Publisher and Subscriber
#include "ros/ros.h"
#include "std_msgs/String.h"
/**
* This tutorial demonstrates simple receipt of messages over the ROS system.
*/
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
ROS_INFO("I heard: [%s]", msg->data.c_str());
}
@jacknlliu
jacknlliu / ROS-Project-CMakeLists.txt
Created October 16, 2016 07:12
ROS Project CMakeLists.txt template
project(package_name)
## Find catkin macros and libraries, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
@jacknlliu
jacknlliu / event_program_framework.cpp
Last active October 18, 2016 15:03
A framework for programs with event loop handler and thread like Qt main() function
// some global data for share
data global_for_share;
// define class class_main for all tasks
class class_main
{
public:
class_main(data* shared_data){
@jacknlliu
jacknlliu / get-keyboard-hit-nonblock.c
Last active October 19, 2016 15:12
Listen and get keyboard input with nonblock way
#ifdef __WIN32
#include <conio.h>
#include <stdio.h>
#else
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>