KISS πŸ‡ΊπŸ‡¦

Stop the war!

Stop the war in Ukraine! Fuck putin!

More information is at: https://war.ukraine.ua/.

There is a fund to support the Ukrainian Army: https://savelife.in.ua/en/donate/, and there is a special bank account that accepts funds in multiple currencies: https://bank.gov.ua/en/about/support-the-armed-forces. I donated to them. Please donate if you can!

Killer putin

Killer putin. Source: politico.eu.

Arrested putin

"It hasn't happened yet, but it will happen sooner or later. Beautiful photo, isn't it?" Source: twitter.

Ack in octopress's directory

| comments

You sure know one of the basic command-line tools used to search patterns in files, called grep (and egrep and similar ones). Recently I came across a better replacement of grep that is more suitable in 98% of cases. Behold: ack! Two main features why I like it are by-default ignoring of all the irrelevant files and directories (backup files, .git and .svn directories, etc.) and color highlighting of search results.

First, install it if you haven’t yet:

1
2
3
4
5
6
7
8
9
10
11
12
# Arch Linux
$ yaourt ack

# Ubuntu Linux
$ sudo apt-get install ack-grep

# OS X
$ brew install ack

# or
# Your distro
$ sudo I want ack now!

When I tried to do a search of $header-bg like this:

1
$ ack --ignore-dir=public/ '\$header-bg'

to change it, there were no results. How can that be if I’m 100% sure it’s defined in a style file? Little digging in the man page and using the -f switch revealed that ack searches in the files which type it knows only by default. The -a switch makes it look inside unknown files as well.

However, it’s better to tell ack that we want it to support .markdown and .scss text files too. Add the lines to your ~/.ackrc file:

~/.ackrc
1
2
3
--type-set=markdown=.markdown

--type-add=css=.scss

Comments