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 <iostream> | |
using namespace std; | |
template<typename itemType> | |
class RangeBasedLooper { | |
itemType *beginItem; | |
int count; | |
public: | |
RangeBasedLooper(itemType *initialItem, int size_) : beginItem(initialItem), count(size_){} |
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
#pragma once | |
#include <mutex> | |
#include <map> | |
#include <functional> | |
#include <chrono> | |
template<class keyType, class dataType> | |
class ConcurrentMap { | |
std::map<keyType, dataType> dataMap; |
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 os | |
import re | |
def line_similarity_level(line1, line2): | |
matchlinecnt = 0 | |
for idx in range(len(line1)): | |
idx = idx + 1 | |
char1 = ' ' | |
char2 = ' ' | |
try: |
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
#!/bin/bash | |
sudo apt-get install git cmake build-essential vim python3-dev | |
# amix vim configs | |
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime | |
sh ~/.vim_runtime/install_awesome_vimrc.sh | |
# youCompleteMe | |
cd ~/.vim_runtime/ |
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
# /usr/share/lightdm/lightdm.conf.d/01_debian.conf | |
[Seat:*] | |
greeter-session=lightdm-greeter | |
greeter-hide-users=false | |
autologin-session=true | |
autologin-user=<username> | |
autologin-user-timeout=1 | |
session-wrapper=/etc/X11/Xsession |
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
#!/bin/bash | |
echo "processing file `pwd`/cscope_create_db.sh" | |
curdir=`pwd` | |
project_dir="asdasdasd" | |
cscope_dir="${project_dir}/cscope" | |
cscope_file="${cscope_dir}/cscope.files" | |
NEW_CSCOPE_DB="asdasdasdcscope/cscope.out" |
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
#!/bin/bash | |
cur_dir=`pwd` | |
project_dir=$1 | |
cscope_dir=${project_dir}/cscope | |
rm -rf ${cscope_dir} | |
mkdir -p ${cscope_dir} | |
find ${project_dir}/ -type f \( \ | |
-name *.c \ |
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
#!/bin/bash | |
tmux start-server | |
dev_session_name="dev" | |
tmux has-session -t $dev_session_name | |
if (( $? )) ; then | |
tmux new-session -d -s ${dev_session_name} -n src | |
tmux send-keys "ses 0 command" C-m |
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
#!/bin/bash | |
tmux start-server | |
tmux new-session -d -s dummy | |
for var in "$@" | |
do | |
m_current_env=$var | |
m_current_session_name=$m_current_env | |
tmux has-session -t $m_current_session_name |
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:18.04 | |
CMD /bin/bash | |
RUN apt-get update --upgrade | |
RUN apt-get install -y make cmake g++ gcc git libczmq-dev libwebsockets-dev build-essential | |
RUN apt-get -y install sudo --no-install-recommends apt-utils | |
RUN adduser --disabled-password --gecos '' yunus | |
RUN adduser yunus sudo |
NewerOlder