Last active
August 29, 2015 14:04
Revisions
-
yulijia revised this gist
Jul 23, 2014 . 3 changed files with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ alias count='ll -h ./ |grep "^-" |wc -l' alias win7='cd /run/media/root' alias vi='vim' __pl() { /root/bin/codefile.sh $1 "pl"; }; This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ au BufRead,BufNewFile *.md set filetype=markdown This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,8 @@ elif [[ "$2" == "pl" ]] ; then echo "# DESCRPTION: " >> $1.$2 echo "# " >> $1.$2 echo "# " >> $1.$2 # gedit $1.$2 vi $1.$2 : elif [[ "$2" == "md" ]] ; then touch $1.$2 @@ -38,7 +39,8 @@ elif [[ "$2" == "r" ]] ; then echo "# DESCRPTION: " >> $1.R echo "# " >> $1.R echo "# " >> $1.R # gedit $1.R vi $1.R : #elif [[ "$2" == "py" ]] ; then # touch $1.$2 -
yulijia created this gist
Jul 23, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ alias count='ll -h ./ |grep "^-" |wc -l' alias win7='cd /run/media/root' __pl() { /root/bin/codefile.sh $1 "pl"; }; alias pl='__pl' __md() { codefile.sh $1 "md"; }; alias md='__md' __r() { codefile.sh $1 "r"; }; alias r='__r' This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ #!/bin/bash time=`date` authorname=`whoami` if [[ -z $1 ]] ; then echo $"couldn't find filename, please give a filename" elif [[ "$2" == "pl" ]] ; then touch $1.$2 echo "#!/usr/bin/perl -w" >> $1.$2 echo " " >> $1.$2 echo "# CODE_NAME: $1" >> $1.$2 echo "# DATE: $time" >> $1.$2 echo "# AUTHOR: $authorname" >> $1.$2 echo "# DESCRPTION: " >> $1.$2 echo "# " >> $1.$2 echo "# " >> $1.$2 gedit $1.$2 : elif [[ "$2" == "md" ]] ; then touch $1.$2 echo "<!--" >> $1.$2 echo "# CODE_NAME: $1" >> $1.$2 echo "# DATE: $time" >> $1.$2 echo "# AUTHOR: $authorname" >> $1.$2 echo "# DESCRPTION: " >> $1.$2 echo "# " >> $1.$2 echo "# " >> $1.$2 echo "-->" >> $1.$2 gedit $1.$2 : elif [[ "$2" == "r" ]] ; then touch $1.R echo "# CODE_NAME: $1" >> $1.R echo "# DATE: $time" >> $1.R echo "# AUTHOR: $authorijia" >> $1.R echo "# DESCRPTION: " >> $1.R echo "# " >> $1.R echo "# " >> $1.R gedit $1.R : #elif [[ "$2" == "py" ]] ; then # touch $1.$2 # echo "<!--" >> $1.$2 # echo "# CODE_NAME: $1" >> $1.$2 # echo "# DATE: $time" >> $1.$2 # echo "# AUTHOR: $authorijia" >> $1.$2 # echo "# DESCRPTION: " >> $1.$2 # echo "# " >> $1.$2 # echo "# " >> $1.$2 codefile.sh