Exporting data from specific table from mongo database
mongoexport –db <dbname> –collection <table_name> –out /<path>/<filename>.json
mongoexport –db <dbname> –collection <table_name> –out /<path>/<filename>.json
Just execute following SVN command: svn switch –relocate https://svn.exmaple.de/trunk https://repos.example.de/scm/svn/trunk where first argument is the current path to repository (execute ‘svn info’ for more details) and the second argument is a new path
To create a shortcut for command, first open: mate ~/.bashrc then add following line: alias sencha="/Users/uzza/bin/Sencha/Cmd/3.1.2.342/sencha" which means: alias new_command_name="command goes here"
When you are trying to install something with npm and all GET requests fails with 304 HTTP ERROR then just do: npm cache clean
Upgrading To upgrade bash you need to install bash via brew: brew install bash then add /usr/local/bin/bash to /etc/shells and change the default shell with following command: chsh -s /usr/local/bin/bash Check if your bash version is ok: bash –version if its not, go to /etc/paths and shift /usr/local/bin to be over the /bin Reference http://stackoverflow.com/questions/16416195/how-do-i-upgrade-bash-in-mac-osx-mountain-lion-and-set-it-the-correct-path… Read More »
Following script will look for all .mp3 files in the current directory and create .m3u playlist from them Script: #!/bin/sh DIR="./" SUFFIX="mp3" FILE_NAME="$1.m3u" echo "#EXTM3U" >> $FILE_NAME for i in "$DIR"/*.$SUFFIX do echo ${i%%} |sed ‘s#^.*/##’ >> $FILE_NAME done Command: sh script.sh FILENAME
Generate key: ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (/home/uzza/.ssh/id_rsa): your_key_name Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in your_key_name. Your public key has been saved in your_key_name.pub. The key fingerprint is: 30:c4:21:b3:2d:33:f7:00:f2:7b:24:1b:18:29:2c:31 uzza@Uzza-mint The key’s… Read More »
There is a problem with binding CTRL as a shortcut in Guake console. Following code solves this problem: Getting current shortcut: gconftool-2 -g /apps/guake/keybindings/global/show_hide Setting new one: gconftool-2 -t string -s /apps/guake/keybindings/global/show_hide "<Control>less"
var el = document.getElementById("main_menu"); var details = el.getBoundingClientRect(); Futher reading: http://ejohn.org/blog/getboundingclientrect-is-awesome/
Open your .profile file (on linux is .bashrc): mate ~/.profile Add following line: export trunk="https://svn.server.com/repo_name/trunk" And use $trunk with merge command: svn merge -c 3435 $trunk