Skip to content

Instantly share code, notes, and snippets.

View galaakk's full-sized avatar

Eric Dejonckheere galaakk

View GitHub Profile
@galaakk
galaakk / Gemfile
Last active December 27, 2015 13:58
Detect Windows platform - conditional Gem loading
source "http://rubygems.org"
gem "win32console", ">= 1.3.2", :platforms => [:mswin, :mingw, :mingw_18, :mingw_19, :mingw_20]
@galaakk
galaakk / quick-web-publish.md
Last active December 27, 2015 04:49
Quick and easy publishing on the Web

Write, click, publish: quick and easy!

If you want to create a blog, you have hundreds of solutions waiting for you, free and paid.

But all of them require technical knowledge at some point: HTML/CSS, databases, etc.

There's a new way of doing it, quick and easy, with the help of Markdown and some talented developpers.

The Idea

@galaakk
galaakk / mavericks-gcc.md
Last active December 26, 2015 17:08
Mavericks + GCC

Après avoir mis à jour OS X avec Mavericks, j'ai bien sûr constaté une amélioration générale des performances, comme tout le monde, mais j'ai aussi rencontré quelques bugs avec certaines applications ou fonctionnalités.

Je partage ici mes solutions, notamment pour gcc/brew/gem.

GCC

Apple a purement et simplement supprimé gcc de Mavericks pour le remplacer par le néanmoins très efficace Clang.

Mais cette modification soudaine empêche brew, gem et d'autres outils de fonctionner correctement.

@galaakk
galaakk / howmanywords
Created July 13, 2013 21:22
Find occurences of a word in files sorted by order
sed 's/ /\'$'\n/g' FILENAME | sort | uniq -c | sort -nr | more
@galaakk
galaakk / index.html
Created April 20, 2013 10:42
OCTOPRESS: create categories page index.html
---
layout: default
title: Blog Categories
---
{% for item in site.categories %}
<div class="category-block">
<h2 class="category-title-{{ item[0] | downcase }}"><a href="{{ root_url }}/categories/{{ item[0] | downcase | replace:' ','-' | replace:'é','e'}}/">{{ item[0] | capitalize }}</a></h2>
</div>
{% endfor %}
@galaakk
galaakk / gdel.rc
Created April 18, 2013 21:05
SH: remove deleted git files from stage
alias gdel="for x in `git status | grep deleted | awk '{print $3}'`; do git rm $x; done"
@galaakk
galaakk / copylast.rc
Created April 18, 2013 21:01
SH: copy result of last command in clipboard (osx)
alias copylast="fc -e -|pbcopy"
@galaakk
galaakk / ftags.rc
Created April 18, 2013 20:58
SH: search for tags with spotlight in the CLI (osx)
ftags () { mdfind "kMDItemOMUserTags == "$1"";}
@galaakk
galaakk / chgext.sh
Last active December 16, 2015 09:49 — forked from ttscoff/a.rb
# batch change extension (fix from Lri, again)
chgext() {
for file in *.$1 ; do mv "$file" "${file%.$1}.$2" ; done
}
@galaakk
galaakk / gist:5291436
Last active December 15, 2015 16:48
OCTOPRESS: Custom CSS per post
---
layout: default
title: New post
css: special
---
# Create a custom post tag named 'css' in your post and give it the name of the desired file as an attribute