Skip to content

Instantly share code, notes, and snippets.

@thomasgohard
thomasgohard / backup.sh
Created August 5, 2013 16:49
A simple backup script.
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2013 Thomas Gohard
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@thomasgohard
thomasgohard / .inputrc
Last active December 20, 2015 15:59
.inputrc with improved input completion and command-line navigation
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
"\e[1;5C": end-of-line
"\e[1;5D": beginning-of-line
"\e[1;3C": forward-word
"\e[1;3D": backward-word
@thomasgohard
thomasgohard / ubuntu-install-nodejs-grunt
Last active December 20, 2015 16:08
Installing node.js and grunt on Ubuntu
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo npm install -g grunt-cli
sudo npm install -g bower
@thomasgohard
thomasgohard / README.md
Last active December 21, 2015 19:20
Post-installation set-up of for Ubuntu

Post-installation set-up for Ubuntu

Get the eCryptfs mount passphrase for the home folder

ecryptfs-unwrap-passphrase

@thomasgohard
thomasgohard / .travis.yml
Last active December 21, 2015 19:49
How to enable Jekyll+Prose on a GitHub repository.
language: ruby
branches:
only:
- master
script:
- "bundle exec jekyll build"
- ./build.sh
@thomasgohard
thomasgohard / CreatingContentThatWorksOnAnyDevice.md
Last active January 2, 2016 00:19
Responsive Web content article for CCO.

Creating content that works on any device

The trick to creating content that works on any device is simple: Create your content for the most restrictive contexts of use first; then enhance your content based on the capabilities of the device used to read it.

This ensures not only that your content can be read on any device, but also that the reading experience is optimised for the device used to read it.

How do you do that?

Focus on your user's needs

Details/summary

Problem:

  • The height of a details/summary element pair is equal to the height of the summary element only when the details element is collapsed.
    • The details/summary element must be expanded before its height can be calculated.
  • Setting an equal height on a collapsed element makes it take up the space it would take up while expanded even though it is collapsed.
    • The equal height should only apply when at least one more details/summary element pair is expanded on the same baseline.

Temporarily expanding a detail/summary element pair:

elm.setAttribute("open", "open")

== Resources ==

=== Performance ===

@thomasgohard
thomasgohard / Jekyll-dev.md
Created February 5, 2014 16:43
Setup for developing Jekyll sites on GitHub.
  1. Install Ubuntu.
  2. Install Ruby (sudo apt-get install ruby2.0 ruby2.0-dev).
  3. Install github-pages gem (sudo gem install github-pages).
@thomasgohard
thomasgohard / setup-brackets-dev
Last active August 29, 2015 14:24
AEM development environment
# Setup a development environment for AEM using Brackets
1. Install Brackets.
2. Install the AEM and Brackets-git extensions.