A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| # good git book | |
| http://git-scm.com/book | |
| # Discard uncommitted changes in a specific file | |
| git checkout file_name | |
| # Clear everything not in repo | |
| git checkout -- . | |
| # A way to quickly move to the previous commit in a git branch. This also way for "deleting" last commit. | 
| require "iconv" | |
| encoding = "SHIFT-JIS" | |
| # Open a file for writing in the Shift-JIS format | |
| File.open("output.csv", "w:#{encoding}") do |io| | |
| # Read the CSV file, and convert CRs to CRLFs. | |
| csv = File.open("input.csv").read.gsub("\r", "\r\n") | |
| # Convert the CSV to the correct encoding | |
| io.write Iconv.iconv(encoding, "UTF-8", csv).join | |
| end | 
| wget https://github.com/vslavik/poedit/releases/download/v1.8.6-oss/poedit-1.8.6.tar.gz | |
| tar xf poedit-1.8.6.tar.gz | |
| cd poedit-1.8.6 | |
| apt-get install -y build-essential libwxgtk3.0-dev libicu-dev libgtkspell-dev libdb++-dev liblucene++-dev libboost-dev libboost-regex-dev libboost-system-dev libwxgtk3.0-dev | |
| sed -i 's/Version: 3.0.3.4/Version: 3.0.5/' /usr/lib/x86_64-linux-gnu/pkgconfig/liblucene++.pc | |
| ./configure | |
| make | |
| make install | 
| <?php | |
| namespace Application\Entity; | |
| /** | |
| * Class Foo | |
| * | |
| * @package Application\Entity | |
| */ | |
| class Foo | |
| { | 
| #!/usr/bin/env bash | |
| # Install dependencies | |
| yum update -y | |
| yum install -y gcc apr-devel apr-util-devel openssl-devel pcre-devel libxml2-devel libcurl-devel | |
| mkdir setup && cd setup | |
| wget http://mirrors.besplatnyeprogrammy.ru/apache//httpd/httpd-2.4.4.tar.gz | |
| tar -xvf httpd-2.4.4.tar.gz |