Skip to content

Instantly share code, notes, and snippets.

@kleberncto
kleberncto / redirect-ssh.txt
Created June 20, 2017 15:56
Redirect SSH Port to Localhost
ssh -L 15672:localhost:15672 [email protected]
smbpasswd -r 10.10.20.10 -U piero.giusti
\ParameterConfigRepository::shouldReceive('findOneByParameterCodeAndPartner')
->once()
->andReturnUsing(function ($code) {
$params = [
'ftp' => '127.0.0.1',
'user' => 'fernandinho',
'password' => '1234'
];
return $params[$code];
@kleberncto
kleberncto / MySQL_Remove_Full_Group_By.txt
Created August 16, 2016 18:36
Remove full group by MySQL
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
@kleberncto
kleberncto / PS1
Last active August 16, 2016 18:36
Change PS1 colours to work with GIT
PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[31m\][\h]`git branch 2>/dev/null | grep \ | head -1 | sed "s/\ //g" | awk "{ print \"[ \"\\\$1 \" ]\" }"` \[\033[1;33m\]\w\a\[\033[0m\]\n\$ '