Skip to content

Commit 56ec78b

Browse files
authored
Merge branch 'master' into install-ubuntu
2 parents f729b11 + c971af1 commit 56ec78b

File tree

71 files changed

+517
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+517
-88
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> Contribution Guide from https://github.com/thoughtbot/til
44
5+
*All TILs are located in _til/*
6+
57
When you learn something,
68
add a Markdown file to
79
this repo explaining it in concise terms.
@@ -42,7 +44,7 @@ You can quickly spell check with
4244
rake proof
4345
```
4446

45-
Depending on your platform, words will be flagged that are correctly spelled (our baseline will be dictionaries-common on Ubuntu 12.04). So if you are 100% sure a word is correctly spelled then add it in all caps to ```dictionary.yml``` so it will not be flagged.
47+
Depending on your platform, words will be flagged that are correctly spelled (our baseline will be dictionaries-common on Ubuntu 14.04). So if you are 100% sure a word is correctly spelled then add it in all caps to ```dictionary.yml``` so it will not be flagged.
4648

4749
To run the full test suite run
4850

_config.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,22 @@ baseurl:
55
google_analytics_key:
66
show_full_navigation: true
77

8+
# Dependencies
9+
markdown: kramdown
10+
kramdown:
11+
input: GFM
12+
hard_wrap: false
13+
highlighter: rouge
14+
815
# Values for the jekyll-seo-tag gem (https://github.com/jekyll/jekyll-seo-tag)
916
logo: /siteicon.png
1017
description: Things we learned.
1118
author:
1219
name: ACM@UIUC
1320
email: til@acm.illinois.edu
14-
twitter: ACM-UIUC# twitter username without the @ symbol
21+
twitter: ACM-UIUC
1522
social:
16-
name: ACM@UIUC TIL
23+
name: ACM@UIUC
1724
links:
1825
- https://github.com/acm-uiuc
1926

@@ -34,7 +41,7 @@ exclude:
3441

3542
collections:
3643
til:
37-
title: Things We Learned
44+
title: Today We Learned
3845
permalink: /:path/
3946
output: true
4047

_layouts/default.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,19 @@ <h1>
4343
</li>
4444
</ul>
4545

46-
<ul>
46+
<ul class="article-list">
4747
{% assign grouped = site.til | group_by: 'category' %}
4848
{% for group in grouped %}
49-
<li class="nav-item top-level {% if group.name == page.category %}current{% endif %}">
50-
{% assign items = group.items | sort: 'order' %}
51-
<a href="{{ site.baseurl }}{{ items.first.url }}">{{ group.name }}</a>
52-
<ul>
53-
{% for item in items %}
54-
<li class="nav-item {% if item.url == page.url %}current{% endif %}"><a href="{{ site.baseurl }}{{ item.url }}">{{ item.title }}</a></li>
55-
{% endfor %}
56-
</ul>
49+
<li>
50+
<details>
51+
{% assign items = group.items | sort: 'order' %}
52+
<summary class="nav-item top-level {% if group.name == page.category %}current{% endif %}"><a>{{ group.name }}</a></summary>
53+
<ul>
54+
{% for item in items %}
55+
<li class="nav-item {% if item.url == page.url %}current{% endif %}"><a href="{{ site.baseurl }}{{ item.url }}">{{ item.title }}</a></li>
56+
{% endfor %}
57+
</ul>
58+
</details>
5759
</li>
5860
{% endfor %}
5961
</ul>

_sass/_layout.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ body {
6969

7070
.main {
7171
margin-top: $space + $nav-header-height;
72-
72+
height: 100vh;
73+
overflow-y: scroll;
7374
@media (min-width: $mobile-break) {
7475
margin-top: 0;
7576
}
@@ -117,6 +118,14 @@ header {
117118
}
118119
}
119120

121+
.article-list {
122+
overflow-y: scroll;
123+
height: calc(100vh - 195px);
124+
height: -o-calc(100vh - 195px); /* opera */
125+
height: -webkit-calc(100vh - 195px); /* google, safari */
126+
height: -moz-calc(100vh - 195px); /* firefox */
127+
}
128+
120129
.open-nav {
121130
background-image: url(/images/menu.svg);
122131
background-color: transparent;
@@ -246,7 +255,7 @@ nav > ul {
246255
text-decoration: none;
247256
font-size: 1.4rem;
248257
padding: $space / 2 0 $space / 2 $space * 2;
249-
display: block;
258+
display: inline-block;
250259
}
251260

252261
&.current > a,

_til/awk/awk-cookbook.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Awk Cookbook
3+
category: awk
4+
---
5+
6+
This is a collection of snipits of common tasks
7+
8+
#### Remove everything before the last space
9+
```sh
10+
awk {'print $NF'}
11+
```
12+
13+
#### Remove a substring from the end of each line in a file
14+
```sh
15+
awk '{gsub(/{SUB_STRING]$/,""); print}' file.txt
16+
```

_til/git/checkout-previous-branch.md renamed to _til/git/branching/checkout-previous-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Checkout Previous Branch
3-
category: git
3+
category: git/branching
44
---
55

66
Git makes it easy to checkout the last branch you were on.

_til/git/clean-out-all-local-branches.md renamed to _til/git/branching/clean-out-all-local-branches.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Checkout Previous Branch
3-
category: git
2+
title: Clean Out All Local Branches
3+
category: git/branching
44
---
55

66
Sometimes a project can get to a point where there are so many local

_til/git/grab-a-file-from-another-branch.md renamed to _til/git/branching/grab-a-file-from-another-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Use a file from another branch
3-
category: git
3+
category: git/branching
44
---
55

66
Sometimes you just need one file from another branch. Sure you could `git

_til/git/move-the-latest-commit-to-a-new-branch.md renamed to _til/git/branching/move-the-latest-commit-to-a-new-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Move The Latest Commit To A New Branch
3-
category: git
3+
category: git/branching
44
---
55

66
I sometimes find myself making a commit against the `master` branch that I

_til/git/renaming-a-branch.md renamed to _til/git/branching/renaming-a-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Renaming A Branch
3-
category: git
3+
category: git/branching
44
---
55

66
The `-m` flag can be used with `git branch` to move/rename an existing

_til/git/viewing-a-file-on-another-branch.md renamed to _til/git/branching/viewing-a-file-on-another-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Viewing A File On Another Branch
3-
category: git
3+
category: git/branching
44
---
55

66
Sometimes you want to view a file on another branch (without switching

_til/git/what-is-the-current-branch.md renamed to _til/git/branching/what-is-the-current-branch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: What Is The Current Branch?
3-
category: git
3+
category: git/branching
44
---
55

66
This question can be answered with one of git's plumbing commands,

_til/git/accessing-a-lost-commit.md renamed to _til/git/committing/accessing-a-lost-commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Accessing A Lost Commit
3-
category: git
3+
category: git/committing
44
---
55

66

_til/git/amend-author-of-previous-commit.md renamed to _til/git/committing/amend-author-of-previous-commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Amend Author Of Previous Commit
3-
category: git
3+
category: git/committing
44
---
55

66
The author of the previous commit can be amended with the following command

_til/git/checking-commit-ancestry.md renamed to _til/git/committing/checking-commit-ancestry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Checking Commit Ancestry
3-
category: git
3+
category: git/committing
44
---
55

66
I have two commit shas and I want to know if the first is an ancestor of the

_til/git/cherry-pick-a-range-of-commits.md renamed to _til/git/committing/cherry-pick-a-range-of-commits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Cherry Pick A Range Of Commits
3-
category: git
3+
category: git/committing
44
---
55

66
Git's `cherry-pick` command allows you to specify a range of commits to be

_til/git/grep-over-commit-messages.md renamed to _til/git/committing/grep-over-commit-messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Grep Over Commit Messages
3-
category: git
3+
category: git/committing
44
---
55

66

_til/git/list-different-commits-between-two-branches.md renamed to _til/git/committing/list-different-commits-between-two-branches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: List Different Commits Between Two Branches
3-
category: git
3+
category: git/committing
44
---
55

66
There are times when I want to get a sense of the difference between two

_til/git/show-all-commits-for-a-file-beyond-renaming.md renamed to _til/git/committing/show-all-commits-for-a-file-beyond-renaming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Show All Commits For A File Beyond Renaming
3-
category: git
3+
category: git/committing
44
---
55

66
By including `-- <filename>` with a `git log` command, we can list all the

_til/git/split-up-a-commit.md renamed to _til/git/committing/split-up-a-commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Split Up a Commit, Rewrite History
3-
category: git
3+
category: git/committing
44
---
55

66
When working on a branch with multiple commits, you can "go back in time" and revise previous commits any way you please.

_til/git/squashing-commits.md renamed to _til/git/committing/squashing-commits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Two ways of squashing commits
3-
category: git
3+
category: git/committing
44
---
55

66
It is handy to squash down your commits before merging your PR with

_til/git/verbose-commit-message.md renamed to _til/git/committing/verbose-commit-message.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Verbose Commit Message
3-
category: git
3+
category: git/committing
44
---
55

66
Git allows you to display a *diff* of the staged changes in the commit

_til/git/find-the-initial-commit.md renamed to _til/git/history/find-the-initial-commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Find The Initial Commit
3-
category: git
3+
category: git/history
44
---
55

66
By definition, the initial commit in a repository has no parents. You can

_til/git/last-commit-a-file-appeared-in.md renamed to _til/git/history/last-commit-a-file-appeared-in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Last Commit A File Appeared In
3-
category: git
3+
category: git/history
44
---
55

66
In my project, I have a `README.md` file that I haven't modified in a while.

_til/git/reference-a-commit-via-commit-message-pattern-matching.md renamed to _til/git/history/reference-a-commit-via-commit-message-pattern-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Reference A Commit Via Commit Message Pattern Matching
3-
category: git
3+
category: git/history
44
---
55

66
Generally when referencing a commit, you'll use the SHA or a portion of the

_til/git/intent-to-add.md renamed to _til/git/staging/intent-to-add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Intent To Add
3-
category: git
3+
category: git/staging
44
---
55

66
Git commands like `git diff` and `git add --patch` are awesome, but their

_til/git/resetting-a-reset.md renamed to _til/git/staging/resetting-a-reset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Resetting A Reset
3-
category: git
3+
category: git/staging
44
---
55

66
Sometimes we run commands like `git reset --hard HEAD~` when we shouldn't

_til/git/staging-and-commiting.md renamed to _til/git/staging/staging-and-commiting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Staging and Committing
3-
category: git
3+
category: git/staging
44
---
55

66
## Staging
@@ -53,4 +53,4 @@ or
5353
```sh
5454
git commit -m --interactive "commit message"
5555
```
56-
if you want to stage certain files
56+
if you want to stage certain files

_til/git/staging-stashes-interactively.md renamed to _til/git/staging/staging-stashes-interactively.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Staging Stashes Interactively
3-
category: git
3+
category: git/staging
44
---
55

66
The `-p` flag can be used with `git stash`, just as it is used with `git add`,

_til/git/grab-a-single-file-from-a-stash.md renamed to _til/git/stashing/grab-a-single-file-from-a-stash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Grab A Single File From A Stash
3-
category: git
3+
category: git/stashing
44
---
55

66
In git, you can reference a commit SHA or branch to checkout differing

_til/git/stashing-only-unstaged-changes.md renamed to _til/git/stashing/stashing-only-unstaged-changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Stashing Only Unstaged Changes
3-
category: git
3+
category: git/stashing
44
---
55

66
If you have both staged and unstaged changes in your project, you can

_til/git/stashing-untracked-files.md renamed to _til/git/stashing/stashing-untracked-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Stashing Untracked Files
3-
category: git
3+
category: git/stashing
44
---
55

66
Normally when stashing changes, using `git stash`, git is only going to

_til/git/clean-up-old-remote-tracking-references.md renamed to _til/git/tracking/clean-up-old-remote-tracking-references.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Clean Up Old Remote Tracking References
3-
category: git
3+
category: git/tracking
44
---
55

66
After working on a Git-versioned project for a while, you may find that

_til/git/delete-all-untracked-files.md renamed to _til/git/tracking/delete-all-untracked-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Delete All Untracked Files
3-
category: git
3+
category: git/tracking
44
---
55

66
Git provides a command explicitly intended for cleaning up (read: removing)

_til/git/excluding-files-locally.md renamed to _til/git/tracking/excluding-files-locally.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Excluding Files Locally
3-
category: git
3+
category: git/tracking
44
---
55

66
Excluding (read: ignoring) files that should not be tracked is generally

_til/git/gitignore.md renamed to _til/git/tracking/gitignore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Gitignore
3-
category: git
2+
title: .gitignore
3+
category: git/tracking
44
---
55

66
Typically there are compiled files or very large generated files that you don't want tracked on remotes. So instead of being careful about what you do want to add and what you don't you can just use a gitignore to tell git what not to track.

_til/git/ignore-changes-to-a-tracked-file.md renamed to _til/git/tracking/ignore-changes-to-a-tracked-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Ignore Changes To A Tracked File
3-
category: git
3+
category: git/tracking
44
---
55

66
Files that should never be tracked are listed in your `.gitignore` file. But

0 commit comments

Comments
 (0)