Skip to content

Instantly share code, notes, and snippets.

View ksvbka's full-sized avatar
💭
CFF - Code for food 👍

Trung Kien ksvbka

💭
CFF - Code for food 👍
View GitHub Profile
@ksvbka
ksvbka / appindicator.py
Created May 4, 2018 06:48
App Indicator demo. Create icon in systemtray. Work with both GTK and KDE
#!/usr/bin/python3
import signal
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import Gtk
from gi.repository import AppIndicator3 as AppIndicator
@ksvbka
ksvbka / bobp-python.md
Created April 11, 2018 15:11 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@ksvbka
ksvbka / tmux.conf
Last active April 10, 2018 09:06
Tmux configuration - By KienLT
##################################
### Custom tmux configuration ###
### by KienLT ###
##################################
# Remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
@ksvbka
ksvbka / apt-ftparchive.conf
Created March 20, 2018 15:37 — forked from aarroyoc/apt-ftparchive.conf
Debian/Ubuntu repo using apt-ftparchive
Dir {
ArchiveDir "./debian";
CacheDir "./cache";
};
Default {
Packages::Compress ". gzip bzip2";
Sources::Compress ". gzip bzip2";
Contents::Compress ". gzip bzip2";
};
TreeDefault {
@ksvbka
ksvbka / Makefile
Last active April 1, 2017 17:56
Make file for project witch structure -main.c /module1/*c /module2/*c
CC = gcc
FLAGS = -g
SRC_DIR := module1 module2 .
INCLUDE := $(addprefix -I, $(SRC_DIR))
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.c))
OBJ := $(patsubst %.c, build/%.o,$(SRC))
PROG := build/test.out
@ksvbka
ksvbka / sh.c
Created March 25, 2017 09:26
Simple shell
/*
* @Author: Trung Kien
* @Date: 2017-03-24 23:10:01
* @Last Modified by: ksvbka
* @Last Modified time: 2017-03-25 16:02:15
*/
//
// https://pdos.csail.mit.edu/6.828/2016/homework/sh.c
//
@ksvbka
ksvbka / linkedList.c
Created October 2, 2015 07:08
Library for Linkedlist data struct
/********************************************************************************
Product : Linkedlist Library
Module :
Author : Trung Kien - [email protected]
Description : Library for Linkedlist data struct.
********************************************************************************/
/*-----------------------------------------------------------------------------*/
/* Header inclusions */
@ksvbka
ksvbka / initRxDataPackage.c
Last active August 31, 2015 08:11
[Blog] - Giao tiep theo frame
/*--------------------------------------------------------------------------------
Function: InitRxDataPackage
Purpose: Init Rx Data Package
Parameters: RX_STATE state
Return: NULL
--------------------------------------------------------------------------------*/
VOID InitRxDataPackage()
{
RegisterUartCallback(UART_DATA_EVENT, CollectingDataPackage);
}
@ksvbka
ksvbka / filter.c
Created July 25, 2015 01:55
Implement some filter signal processing as mean filter, HPF, LPF, Kalman...
/********************************************************************************
Product: Filter signal processing
Module: Filter
Created: 7/24/2015, by KIENLTB
Description: Implement filter sinal processing (mean filter, Kalman, HPF, LPF..)
********************************************************************************/
/*-----------------------------------------------------------------------------*/
@ksvbka
ksvbka / kalman.m
Created July 15, 2015 02:47
Example of using Kalman filter for estimates velocity and distance of the vehicle
function kalman(duration, dt)
% function kalman(duration, dt)
%
% Kalman filter simulation for a vehicle travelling along a road.
% INPUTS
% duration = length of simulation (seconds)
% dt = step size (seconds)
measnoise = 10; % position measurement noise (feet)