-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cinhtau/feature/2019-01
Feature/2019 01
- Loading branch information
Showing
34 changed files
with
673 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,10 @@ Gemfile.lock | |
_site | ||
|
||
# fortune strfile | ||
*.dat | ||
*.dat | ||
|
||
# sensitive security data | ||
GH_TOKEN | ||
|
||
# apple | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cookie.cinhtau.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem "github-pages", group: :jekyll_plugins | ||
gem "jekyll-github-metadata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,64 @@ | ||
theme: jekyll-theme-minimal | ||
theme: jekyll-theme-minimal | ||
logo: /assets/images/avatar.png | ||
description: Fortune cookies for geeks. | ||
show_downloads: true | ||
|
||
author: cinhtau | ||
date_format: "%F" | ||
future: true | ||
|
||
# Build settings | ||
markdown: kramdown | ||
highlighter: rouge | ||
|
||
lang: en | ||
|
||
kramdown: | ||
toc_levels: 2..6 | ||
|
||
plugins: | ||
- "jekyll-github-metadata" | ||
- jekyll-archives | ||
- jekyll-sitemap | ||
- jekyll-feed | ||
- jekyll-email-protect | ||
- jekyll-gist | ||
- jemoji | ||
|
||
# Google Analytics | ||
google_analytics: UA-98721919-2 | ||
|
||
permalink: /:year/:month/:day/:title/ | ||
|
||
favicon_dir: "https://cookie.cinhtau.net/assets/favicon" | ||
|
||
exclude: | ||
- Gemfile | ||
- Gemfile.lock | ||
- .gitignore | ||
- gulpfile.js | ||
- node_modules | ||
- drafts | ||
- .idea | ||
- .sass-cache | ||
- geek-fortune-cookies.iml | ||
- docs.ipr | ||
- confidential | ||
- package.json | ||
- package-lock.json | ||
- vendor | ||
- '_assets' | ||
- buildspec.yml | ||
- yarn.lock | ||
- serve.sh | ||
- install.sh | ||
|
||
compress_html: | ||
clippings: all | ||
comments: ["<!-- ", " -->"] | ||
endings: [] | ||
ignore: | ||
envs: [] | ||
blanklines: false | ||
profile: false | ||
startings: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
<footer> | ||
{% if site.github.is_project_page %} | ||
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p> | ||
{% endif %} | ||
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- open graph --> | ||
<meta property="og:image" content="{{ site.favicon_dir }}/og-image.jpg"> | ||
<meta property="og:image:width" content="256"> | ||
<meta property="og:image:height" content="256"> | ||
<meta property="og:title" content="Fortune Cookies for Geeks"> | ||
<meta property="og:description" content="Random wisdom from popular Twitter accounts about Software Development"> | ||
<meta property="og:url" content="https://cookie.cinhtau.net"> | ||
|
||
<!-- favicon --> | ||
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.favicon_dir }}/apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.favicon_dir }}/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.favicon_dir }}/favicon-16x16.png"> | ||
<link rel="manifest" href="{{ site.favicon_dir }}/site.webmanifest"> | ||
<link rel="mask-icon" href="{{ site.favicon_dir }}/safari-pinned-tab.svg" color="#5bbad5"> | ||
<meta name="msapplication-TileColor" content="#da532c"> | ||
<meta name="theme-color" content="#ffffff"> | ||
|
||
{% seo %} | ||
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}"> | ||
|
||
<!--[if lt IE 9]> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
<![endif]--> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{%- if site.posts.size > 0 -%} | ||
<h2>{{ page.list_title | default: "Latest News" }}</h2> | ||
<p class="view"> | ||
{%- for post in site.posts -%} | ||
|
||
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%} | ||
<p>{{ post.date | date: date_format }}</span> - | ||
|
||
<a class="post-link" href="{{ post.url | relative_url }}"> | ||
{{ post.title }} | ||
</a> | ||
</p> | ||
|
||
{%- endfor -%} | ||
</ul></p> | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script> | ||
{% if site.google_analytics %} | ||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
ga('create', '{{ site.google_analytics }}', 'auto'); | ||
ga('send', 'pageview'); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# Jekyll layout that compresses HTML | ||
# v3.0.4 | ||
# http://jch.penibelst.de/ | ||
# © 2014–2015 Anatol Broder | ||
# MIT License | ||
--- | ||
|
||
{% capture _LINE_FEED %} | ||
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
layout: compress | ||
--- | ||
|
||
<!DOCTYPE html> | ||
<html lang="{{ site.lang | default: "en-US" }}"> | ||
|
||
{% include head.html %} | ||
|
||
<body> | ||
<div class="wrapper"> | ||
<header> | ||
<h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1> | ||
|
||
{% if site.logo %} | ||
<img src="{{site.logo | relative_url}}" alt="Logo" /> | ||
{% endif %} | ||
|
||
<p>{{ site.description | default: site.github.project_tagline }}</p> | ||
|
||
{% if site.github.is_project_page %} | ||
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ site.github.repository_nwo }}</small></a></p> | ||
{% endif %} | ||
|
||
{% if site.github.is_user_page %} | ||
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p> | ||
{% endif %} | ||
|
||
{% if site.show_downloads %} | ||
<ul class="downloads"> | ||
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li> | ||
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li> | ||
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li> | ||
</ul> | ||
{% endif %} | ||
|
||
{% include postlist.html %} | ||
</header> | ||
|
||
<section> | ||
|
||
{{ content }} | ||
|
||
</section> | ||
|
||
{% include footer.html %} | ||
|
||
</div> | ||
|
||
{% include script.html %} | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: default | ||
--- | ||
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting"> | ||
|
||
<div class="post-content e-content" itemprop="articleBody"> | ||
{{ content }} | ||
</div> | ||
|
||
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
## The fun has started | ||
|
||
My motivation for this project is a customisation of my `zsh`. | ||
|
||
Every time I login I want to see the current weather of my location and fortune cookie. | ||
|
||
Example: zsh Dark | ||
|
||
![Solarized Dark](https://cinhtau.github.io/geek-fortune-cookies/assets/images/zsh-solarized-dark-fortune.png) | ||
|
||
Example: zsh Light | ||
|
||
![Solarized Light](https://cinhtau.github.io/geek-fortune-cookies/assets/images/zsh-solarized-light-fortune.png) | ||
|
||
## Problem | ||
|
||
I am dissatisfied with the existing content. | ||
|
||
## Solution | ||
|
||
Most of time I read the Twitter tweets from | ||
|
||
- [Programming Wisdom](https://twitter.com/CodeWisdom) | ||
- [I Am Devloper](https://twitter.com/iamdevloper) | ||
|
||
For instance: | ||
|
||
![I Am Developer Tweet](https://cinhtau.github.io/geek-fortune-cookies/assets/images/code_review.png) | ||
|
||
So my idea is to extract the tweets from Twitter and output it as [`fortune`](https://www.unix.com/man-page/freebsd/6/fortune/) | ||
compatible databases for my daily use. |
Oops, something went wrong.