Commit 04070388 authored by Guilherme Henrique's avatar Guilherme Henrique

Add meta post

parent b8209370
stages:
- build-org
- extract-css-classes
- filter-css-classes
- publish
org-generation:
......@@ -20,7 +20,7 @@ org-generation:
paths:
- _posts
script:
- emacs -batch -q -l export.el -f org-publish-all-with-different-directory
- emacs -batch -q -l export.el -f org-publish-with-different-timestamp-directory
# Copy elpa packages to current directory for cache
- cp -rf /root/.emacs.d/elpa/ .
stage: build-org
......@@ -39,7 +39,7 @@ css-theme:
artifacts:
paths:
- _assets/css/syntax.scss
stage: extract-css-classes
stage: filter-css-classes
pages:
image: ruby:2.4-alpine3.6
......
......@@ -198,11 +198,6 @@ img[title="Emerald"] {
box-shadow: 0 2px 6px #ddd;
}
code {
color: lighten($text-color, 35%);
background-color: lighten($background-color, 35%);
}
/* Set the vertical rhythm (and padding-left) for lists inside post content */
.content ul, .content ol {
......
......@@ -78,6 +78,12 @@
color: #c594c5;
}
.org-shinning {
/* shinning-face */
color: #ff0000;
background-color: #ffffff;
}
.org-string {
/* font-lock-string-face */
color: #528B8B;
......
......@@ -14,7 +14,7 @@
(require 'htmlize)
(require 'rainbow-delimiters)
(defun org-publish-all-with-different-directory ()
(defun org-publish-with-different-timestamp-directory ()
(setq org-publish-timestamp-directory ".timestamps/")
(org-publish-all))
......
#+BEGIN_EXPORT html
#+BEGIN_EXPORT html
---
layout: post
title: A Modular Tetris Library
......@@ -58,7 +58,7 @@ For example, this [[https://stackoverflow.com/questions/135834/python-swig-vs-ct
On the other hand, the advantages are the support for multiple languages and time savings when using simple functions.
Let me show a brief demo of a function that calculates the power of a number
#+BEGIN_SRC C
#+BEGIN_SRC C :exports result
int pow(int n) {
return n * n;
}
......@@ -68,7 +68,7 @@ To generate this glue code, we have to write an input interface file containing
The first section is called the preamble and provides declarations to get the code to compile.
The second declaration contains all the functions that you will be included in the wrapper code.
#+BEGIN_SRC C
#+BEGIN_SRC C :exports result
%module example
%{
extern int pow(int n);
......@@ -79,7 +79,7 @@ extern int pow(int n);
To use this module in Python:
#+BEGIN_SRC bash
#+BEGIN_SRC python :exports result
# Will create example.py and example_wrap.c
➜ swig -python example.i
➜ gcc -shared -fPIC example.c example_wrap.c \
......@@ -92,7 +92,7 @@ To use this module in Python:
To use this module in Ruby:
#+BEGIN_SRC ruby
#+BEGIN_SRC ruby :exports result
# Content of extconf.rb
require 'mkmf'
create_makefile('example')
......@@ -100,7 +100,7 @@ create_makefile('example')
# mkmf library will generate a Makefile wich will correctly comple and link the C files into a ruby extension.
# We could generate the module by hand with gcc.
#+BEGIN_SRC bash
#+BEGIN_SRC bash :exports result
# In shell
➜ swig -ruby example.i
# This command will create the Makefile
......
This diff is collapsed.
......@@ -21,3 +21,16 @@
:recursive t
:publishing-function org-publish-attachment)
("zezin" :components ("org-zezin" "org-static-zezin")))))
;; Shinning face
(defface shinning-face
'((t (:background "white" :foreground "red")))
"Face to highlight the Axe word")
(defun axe-highlight ()
(font-lock-add-keywords nil
'(("\\<\\(Axe\\|axe\\)\\>" 1
'shinning-face t))))
(add-hook 'ruby-mode-hook 'axe-highlight)
(add-hook 'python-mode-hook 'axe-highlight)
......@@ -2456,6 +2456,11 @@
/* shadow */
color: #b3b3b3;
}
.org-shinning {
/* shinning-face */
color: #ff0000;
background-color: #ffffff;
}
.org-show-paren-match {
/* show-paren-match */
color: #FDF4C1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment