$ git config --global -e
[merge]
keepBackup = false;
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
keepTemporaries = false
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get purge linux-sound-base alsa-base alsa-utils | |
sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop |
#!/bin/bash | |
# PHP CodeSniffer pre-commit hook for git | |
# | |
# @author Soenke Ruempler <[email protected]> | |
# @author Sebastian Kaspari <[email protected]> | |
# | |
# see the README | |
PHPCS_BIN=/usr/bin/phpcs | |
PHPCS_CODING_STANDARD=PEAR |
#Code for bash, goes into ~/.bashrc: | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ ' |
p4merge* | |
Create a new text file in /usr/local/bin called p4merge and add the following lines: | |
#!/bin/sh | |
/home/usuario/Contents/MacOS/p4merge $* | |
Make the script executable by entering this command: | |
chmod +x p4merge |
#git config --global -e | |
[merge] | |
keepBackup = false; | |
tool = p4merge | |
[mergetool "p4merge"] | |
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false | |
[diff] |
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
class CacheBaseHandler(tornado.web.RequestHandler): | |
def prepare(self): | |
cached = self.application.db.cache.find_one({"slug": self.request.path}) | |
if cached is not None: | |
self.write(cached["content"]) | |
self.finish() | |
def render_string(self, template_name, **kwargs): | |
html_generated = \ |
#deleted branch merged | |
git branch --merged | grep -v \* | xargs git branch -D | |
#deleted branch with before bug | |
git branch --merged | grep 'bug' | xargs git branch -D |
#create one branch desde una ruta remota | |
git checkout -b new_develop --track origin/develop |