fredkerdraon / Linux-New-APO

Works on Ubuntu 18.04.1 LTS + x64 Branch
0 stars 0 forks source link

Other #5

Open fredkerdraon opened 5 years ago

fredkerdraon commented 5 years ago

Gradle

gradle --no-daemon --refresh-dependencies updateLibs gradle --no-daemon -DforceCompilePersistance build.dev gradle --status gradle --stop

Memory analyser

export JAVA_HOME="$HOME/Documents/Java/jdk1.8.0_181" export PATH="$JAVA_HOME/bin:$PATH" ./MemoryAnalyzer

EVOLUTION

sudo apt-get install evolution-ews

:+1:

CLIPS

Build clips from source: https://launchpad.net/ubuntu/+source/clips/6.24-3ubuntu2

gcc -o clips -DLINUX=1 *.c -lm

QT CREATOR

Better use it to manage the cpp projects It's possible to fake Vim inside

Not sure why the mysql.h is not found...

FINANCE

Replace é, " ", and $

sed -i 's/old-text/new-text/g' input.txt

:+1:

VIM

List all the buffers and pick one by number

:buffers
:b 5

To past the text copied at a given position:

Ctrl+r "

To list all the previous commands:

q:

Vimdiff reference https://gist.github.com/mattratleph/4026987 https://stackoverflow.com/questions/2019281/load-different-colorscheme-when-using-vimdiff :+1:

SCILAB

ldd fredmain

When executing Scilab, an error is generated:

Scilab startup function detected that the function proposed to the engine is the wrong one. Usually, it comes from a linker problem in your distribution/OS.
Here, Scilab should have 'libscijvm-disable' defined but gets 'libscijvm' instead.
If you do not know what it means, please report a bug on http://bugzilla.scilab.org/. If you do, you probably know that you should change the link order in SCI/modules/Makefile.am

CGDB

Please compile with the -g option

sudo apt-get install cgdb
cgdb
file fredmain
exec-file ./fredmain cashflows $START_DATE $END_DATE $MAX_CASHFLOW
break 3
run

ESC switch back to source window F8 to go to the next step :+1: Resolved as well and very happy about that

GIT

To remove all the files from the repo but keeping the local ones

git rm --cached *.pdf

:+1: Very happy to be able to do so. Becareful if you forget the --cached!!!

To check a commit

checkcommit()
{
      red=`tput setaf 1`
      green=`tput setaf 2`
      reset=`tput sgr0`
      echo "${red}---------------------- DATE DU COMMIT ----------------${reset}"
      git show -s --format=%ci $1
      echo "${red}---------------------- COMMENTAIRE -------------------${reset}"
      git log --format=%B -n 1 $1
      echo "${red}---------------------- LIST DE FICHIERS -------------------${reset}"
      git diff-tree --no-commit-id --name-only -r $1
 }

git stash save "M38669" git checkout "another branch"..... git stash apply stash^{/M38669}

git checkout -b 1.58.0b v1.58.0 (Creation d'une branche à partir d'un tag) git push -u origin 1.58.0b (Envoi sur le remote de la nouvelle branche)

git update-index --assume-unchanged "server/persistance/conf/hibernate.properties"

git log --pretty=format:%an-%ar-%h-%s -- rcp/module_portage/src/com/apologic/rcp/swing/portage/repas/dialog/RepasDetailAgendaJDialog.java git checkout 94291e7afb -- rcp/module_portage/src/com/apologic/rcp/swing/portage/repas/dialog/RepasDetailAgendaJDialog.form

git log -- server/business_billing/src/com/apologic/server/core/business/billing/facture/FactureCalculTaux.java | grep -B 3 -A 3 44154

git stash show -p stash@{0}

sudo service mysql restart
sudo mysql -u root 

/etc/mysql/
The config files used is the **mysqld.cnf**
sudo vi mysqld.cnf

ps -aux | grep mysql
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo nmap -sTU -O localhost

sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo mysqld_safe --skip-grant-tables &

sudo ufw status
sudo ufw allow 3306/tcp

sudo vi /etc/apparmor.d/usr.sbin.mysqld
journalctl -xe

sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start

--------- Queries ----------------------------------------------------------------------
ALTER USER 'root'@'localhost' IDENTIFIED BY 'fred1301';
update user set plugin = '';

UPDATE mysql.user SET authentication_string=PASSWORD('fred1301'),plugin='mysql_native_password' WHERE User='root' AND Host='localhost';
FLUSH PRIVILEGES;

UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N' WHERE User = 'root' AND Host = 'localhost';

select User from user where User = 'root';

:+1: RESOLVED by adding the option skip-grant-tables in the config file.......

VM

Impossible to save the last state of the machine

VBoxManage modifymedium disk Philae/NewVirtualDisk1.vdi --type writethrough
VBoxManage showhdinfo Philae/NewVirtualDisk1.vdi

Facebook Pidgin

Is there a filter on XMMP protocol?

Install jenkins

Java version issue Looks like Jenkins is started :-) Let's see later if it works properly /var/lib/jenkins/secrets/initialAdminPassword :+

Teamviewer

Not started presumaby on the other side :+1:

Restart a computer

sudo rtcwake -m mem -l -t "$(date -d 'today 11:53:00' '+%s')"
sudo rtcwake -m no -l -t $(date +%s -d 'tomorrow 10:00')

:+1: Works on Ubuntu 18.04.1 LTS

Check differences with reference

comp()
{
        vimdiff $RES/$1 $REF/$1
}

zR will unfold all lines dp: put the changes do: get the changes

List all the functions defined in the shel

typeset -f

git d $file to use vimdiff to check the local changes

getRef()
{
        cp $REF/$1 $RES/$1
}
vim -c "DirDiff dir1 dir2"
https://github.com/will133/vim-dirdiff
sudo apt-get -y install texlive-latex-recommended texlive-pictures texlive-latex-extra

:+1: Works on Ubuntu 18.04.1 LTS

fredkerdraon commented 5 years ago

execute pathogen#infect()
syntax on filetype plugin indent on

set rtp+=/usr/share/powerline/bindings/vim/ " Always show statusline set laststatus=2 " Use 256 colours (Use this setting only if your terminal supports 256 colours) set t_Co=256 set diffopt+=iwhite "if &diff set cursorline set nofoldenable map n ]c map p [c "hi DiffAdd ctermfg=233 ctermbg=LightGreen guifg=#003300 guibg=#DDFFDD gui=none cterm=none "hi DiffChange ctermbg=white guibg=#ececec gui=none cterm=none "hi DiffText ctermfg=233 ctermbg=yellow guifg=#000033 guibg=#DDDDFF gui=none cterm=none highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red "endif set nu :+1: