This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <dirent.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <time.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Serial Port Programming | |
* Base on the tutorial from | |
* http://xanthium.in/Serial-Port-Programming-on-Linux | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <termios.h> | |
#include <errno.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
img = cv2.imread(example.jpg) | |
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
blurred = cv2.GaussianBlur(imgGray, (5, 5), 0) | |
imgCanny = cv2.Canny(blurred, 50, 80) | |
cv2.namedWindow('Canny Edge', cv2.WINDOW_NORMAL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flip(s): | |
sz = len(s) | |
flip = 0 | |
for i in xrange(0, sz - 1): | |
if s[i] == 'C' and s[i + 1] == 'S': | |
s[i], s[i + 1] = 'S', 'C' | |
flip = 1 | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flip(s): | |
sz = len(s) | |
flip = 0 | |
for i in xrange(0, sz - 1): | |
if s[i] == 'C' and s[i + 1] == 'S': | |
s[i], s[i + 1] = 'S', 'C' | |
flip = 1 | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/sfinix/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" required for Vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'ajmwagar/vim-deus' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remap prefix from c-b to c-space | |
unbind C-b | |
set-option -g prefix C-Space | |
bind-key C-Space send-prefix | |
# Open tmux config file in vim new window | |
unbind e | |
bind e new-window -n '~/.tmux.conf' "sh -c 'vim ~/.tmux.conf' && tmux source ~/.tmux.con" | |
# Modern colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see https://i3wm.org/docs/userguide.html for a complete reference! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!-------- Xterm Terminal Settings {{{ | |
!------------------------------------------------------ | |
! https://wiki.archlinux.org/index.php/Xterm | |
! https://lukas.zapletalovi.com/2013/07/hidden-gems-of-xterm.html | |
! http://www.futurile.net/2016/06/14/xterm-setup-and-truetype-font-configuration/ | |
! http://www.futurile.net/2016/06/15/xterm-256color-themes-molokai-terminal-theme/ | |
! Allow xterm to report the TERM variable correctly. | |
! Do not set the TERM variable from your ~/.bashrc or ~/.bash_profile or similar file. | |
! The terminal itself should report the correct TERM to the system so that the proper terminfo file will be used. |
OlderNewer