Barim's blog · ابراهيمfr Local git
Define a repo somewhere in your file system with a bare init
mkdir -p /somewhere/repo/test_project cd /somewhere/repo/test_project git init --bare Now create a local folder for your work with init only
Read moreVS Code loses Go autocompletion on Linux
On my Linux, just after upgrading Go to version 1.9, I lost autompletion functionality in VS Code.
This tip did not work for me.
Read moreDocker from scratch, Go and Multipart upload
To reduce docker container size we can built the image from scratch instead of using bloated images, like debian or worse ubuntu.
Read moreDon't forget master infos in your MySQL dump
I tried to resync a slave MySQL after it disconnected from the master. But the binary log was already deleted on master, so the only solution was to restore from the last backup.
Read moreMySQL import from csv
To import a local CSV file into MySQL, use the syntax below :
LOAD DATA LOW_PRIORITY LOCAL INFILE '/path/tofile.csv' INTO TABLE database.
Read moreMySQL export to csv
To export a mysql results in CSV format, use the syntax below :
SELECT field1, field2, ... FROM table WHERE condition INTO OUTFILE '/tmp/toto.
Read moreAllow invalid date in MySQL
Just in case you absolutely have to insert a date in MySQL that does’nt exist, eg 2014-02-30, you can run MySQL server in a special mode that authorizes such dates :
Read moreGit delete remote branch/tag
As of Git v1.7.0, you can delete a remote branch using :
git push origin --delete <branchName> And you can do exactly the same with a tag
Read moreGIT - stop tracking files
If you have some files that you need to have in your repo but don’t need to have updates, git allows it :