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
listen_for_process() { | |
__keyword=$1; (while :; do __arg=$(pgrep -d',' -f $__keyword); if [ -z "$__arg" ]; then top -u 65536 -n 1; else top -c -n 1 -p $__arg; fi; sleep 1; done;) | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="[\[$(tput sgr0)\]\[\033[38;5;10m\]\d\[$(tput sgr0)\]\[\033[38;5;15m\]] [\[$(tput sgr0)\]\[\033[38;5;10m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\]] - [\[$(tput sgr0)\]\[\033[38;5;10m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]] - [\[$(tput bold)\]\u\[$(tput sgr0)\]] \$(parse_git_branch) :\n\\$ \[$(tput sgr0)\]" | |
parse_git_branch() { |
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 "opencv2/opencv.hpp" | |
#include "opencv2/xfeatures2d.hpp" | |
#include <istream> | |
#include <string> | |
#include <stdint.h> | |
using namespace std; | |
using namespace cv; | |
/* |
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
Mat out; | |
int kernel_size = 31; | |
double sig = 5 /* wave strength in wave direction */, | |
th = 0.0 /* wave angle */, | |
lm = 11.0 /* wavelength */, | |
gm = 0.7 /* wave strength perpendicular to wave (bigger, lowers strength)*/, | |
ps = 0 /* phase shift */; | |
Mat kernel = getGaborKernel(cv::Size(kernel_size,kernel_size), sig, th, lm, gm, ps); | |
imshow("gabor kernel", kernel); | |
filter2D(afterprocess, out, CV_32F, kernel); |
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
set number | |
set showcmd | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set showmatch | |
let mapleader="," " leader is comma | |
inoremap jk <esc> | |
colorscheme torte | |
set incsearch " search as characters are entered |
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
# http://www.atrixnet.com/in-line-search-and-replace-in-files-with-real-perl-regular-expressions/ | |
perl -p -i -e 's/change this/to that/g' file1 file2 file3... | |
perl -p -i'.backup' -e 's/(?<=replace )this(?= lolc[aA@]t)(?# with )/that/; s/(?# and as for all of the )([[:digit:]]+) (?i:fat|skinny|thirsty) camels(?# you really need those)/$1 white llamas/g;' file1 file2 /path/to/file3 | |
perl -p -i -e 's/replace this/using that/g' /all/text/files/in/*.txt |
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
# cp or mv all executables under some folder | |
find . -maxdepth 1 -type f -perm +a=x -print0 | xargs -0 -I {} mv {} executables/ | |
# read single byte from a file | |
temp=`hexdump -ve '1/1 "%0.2x" ""' -s $usageIndexOfSramByte -n 5 $sramdevicename 2> /dev/null` | |
temp=`hexdump -ve '1/1 "%d" ""' -s $usageIndexOfSramByte -n 5 $sramdevicename 2> /dev/null` | |
# Integer Comparison Operators | |
# -eq Is Equal To if [ $1 -eq 200 ] | |
# -ne Is Not Equal To if [ $1 -ne 1 ] |
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
brew install qt ruby ncurses gawk binutils gperf grep gettext ncurses pkgconfig autotools automake autoconf-archive gawk binutils homebrew/dupes/gperf grep gettext ncurses pkgconfig gnu-tar bison coreutils | |
brew install gnu-sed --with-default-names | |
brew link gettext --force && brew link ncursesw --force | |
export PKG_CONFIG_PATH=/usr/local/Cellar/ncurses/6.0_4/lib/pkgconfig/ | |
ln -s /usr/bin/tar ./output/host/bin/tar | |
ln -s /usr/local/bin/gxargs ./output/host/bin/xargs | |
sudo ln -s /usr/local/bin/gcc-7 ./output/host/bin/gcc | |
sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum | |
sudo ln -s /usr/local/bin/gsha512sum /usr/local/bin/sha512sum | |
sudo ln -s /usr/local/bin/gsha1sum /usr/local/bin/sha1sum |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Jul 9 09:52:14 2018 | |
@author: yunus.ayhan | |
""" | |
from PIL import Image | |
import numpy as np | |
import math |
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
FROM ubuntu:12.04 | |
RUN apt-get update && \ | |
apt-get -y install sudo --no-install-recommends apt-utils | |
#RUN useradd -ms /bin/bash change && echo "change:change" | chpasswd && adduser change sudo | |
RUN adduser --disabled-password --gecos '' change | |
RUN adduser change sudo | |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers |
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
/* | |
* File: MenuExecuterInstance.h | |
* Author: change | |
* | |
* Created on November 12, 2018, 2:58 PM | |
*/ | |
#ifndef MENUEXECUTERFUNCTION_H | |
#define MENUEXECUTERFUNCTION_H |
OlderNewer