CuTt8: git branch by date

Copper’s Tips & Tricks #8: git branch by date Here at the office we use feature branches. Feature branches with ticket name/numbers. Now, I am good at remembering numbers, but when I have to switch between different tickets I have no idea which one’s the one I was working on last. Also, when you use […]

CuTt7: theme-symlink

Copper’s Tips & Tricks #7: theme-symlink WordPress developers, I know some of you who use Sublime or similar tools with file explorer sidebars, have problems. Innumerable, as we’re all humans, and perfection is unattainable. I know some of you open the whole project folder from the webroot, or even higher up. For you, I have […]

CuTt6: cd symlink “/” autocomplete

Copper’s Tips & Tricks #6: cd symlink autocomplete I found myself questioning everything why do I have to double tap tab whenever I want to autocomplete a symlinked directory vs a normal directory. And then, that question urged me to google, and google I did, and found the answer I did, and here it is, […]

CuTt3: Useful terminal shortcuts II

Copper’s Tips & Tricks #3: Useful terminal shortcuts Note: I use iTerm. If you’re here you’re probably computer savvy enough to adapt the instructions to your terminal tool of choice. Miraculously (or through the hard work of people who thought a lot about things in the past) bash has the integrated ability to move word […]

CuTt2: Useful terminal shortcuts I

Copper’s Tips & Tricks #2: Useful terminal shortcuts If you didn’t know about this (and some people at the office don’t/didn’t), first of all, I feel bad for you, your brain, and your fingers. Specially your fingers. By pressing Cmd+R and starting typing, the terminal will start to look for sent commands that match the […]

CuTt: Find file’s fullpath

Copper’s Tips & Tricks #1: Find file’s fullpath Two ways to do this, the normal way, using `find`, and the hipster way, using `tree` and `grep`: The normal way find . -name ‘[filename].[extension]’ # E.g.: $ find . -name ‘wp-config.php’ ./Documents/Sites/some-project/workspace/some-beep/wordpress/wp-config-sample.php ./Documents/Sites/some-project/workspace/some-beep/wordpress/wp-config.php ./Documents/Sites/some-project/workspace/some-boop/wordpress/wp-config-sample.php ./Documents/Sites/some-project/workspace/some-boop/wordpress/wp-config.php ./Documents/Sites/some-project/workspace/some-noise/wordpress/wp-config-sample.php ./Documents/Sites/some-project/workspace/some-noise/wordpress/wp-config.php ./Documents/Sites/some-project/workspace/some-censured/wordpress/wp-config-sample.php ./Documents/Sites/some-project/workspace/some-censured/wordpress/wp-config.php The hipster way $ tree -fi | […]

Colores en terminal Bash & iTerm

Este archivo lo guardas como .bash_prompt en tu home. Generas adentro de .bash_profile (tambien debe estar en tu home) un código como este: for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do [ -r “$file” ] && source “$file” done unset file Cuando reinicies la terminal, deberías verla con colores (el código de bash_profile, chequea si esta alguno de […]

Automount smb shares on OSX Yosemite

Source: ronaldcs’s post on When googling how to do this, I found the tutorial shown above. It’s pretty well explained, although a bit convoluted, the option that actually works for Maverick and above is Option 4. Option 4 is very similar to Option 1, save that it uses a folder other than “Volumes”. This […]

Remove all those .DS_Store files

I don’t like committing .DS_Store files into my projects, so here’s an easy way to remove them: Run this from your project folder: # Recursively erase all .DS_Store files in this folder and below find . -name \.DS_Store -exec rm -v {} \;  

Check MX record from command line

Nice command to check MX record from command line: [code language=”bash”] cat /var/named/ | grep MX [/code] And see: 14400 IN MX 20 ALT1.ASPMX.L.GOOGLE.COM. 14400 IN MX 30 ALT2.ASPMX.L.GOOGLE.COM. 14400 IN MX 40 ALT3.ASPMX.L.GOOGLE.COM. 14400 IN MX 50 ALT4.ASPMX.L.GOOGLE.COM. 14400 IN MX 10 ASPMX.L.GOOGLE.COM.

Bash/SSH autocomplete no funciona ni las teclas de historia

Cuando creas un usuario de cero, por defecto a veces usa un bash medio choto.Por eso, luego de creado hay que chequear que bash usa: # getent passwd USUARIOUSUARIO:x:1001:1001:x:/home/USUARIO:/bin/sh Si esta usando esa básica /bin/sh cambiarlo con: # chsh -s /bin/bash USUARIO

BASH: Run tasks in the background

Run tasks in the background bash lets you runone or more tasks in the background, and selectively suspend or resume any ofthe current tasks (or “jobs”). To run a task in the background, addan ampersand (&) to the end of its command line. Here’s an example:bash> tail -f /var/log/messages &[1] 614Eachtask back-grounded in this manner […]