First commit

This commit is contained in:
Skia 2015-12-21 09:17:45 +01:00
commit 65b994ab10
47 changed files with 2305 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.pyc
output/

14
LICENSE.txt Normal file
View file

@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

108
Makefile Normal file
View file

@ -0,0 +1,108 @@
PY=python
PELICAN=pelican
PELICANOPTS=
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
FTP_HOST=localhost
FTP_USER=anonymous
FTP_TARGET_DIR=/
SSH_HOST=localhost
SSH_PORT=22
SSH_USER=root
SSH_TARGET_DIR=/var/www
S3_BUCKET=my_s3_bucket
CLOUDFILES_USERNAME=my_rackspace_username
CLOUDFILES_API_KEY=my_rackspace_api_key
CLOUDFILES_CONTAINER=my_cloudfiles_container
DROPBOX_DIR=~/Dropbox/Public/
DEBUG ?= 0
ifeq ($(DEBUG), 1)
PELICANOPTS += -D
endif
help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
@echo ' make devserver [PORT=8000] start/restart develop_server.sh '
@echo ' make stopserver stop local server '
@echo ' make ssh_upload upload the web site via SSH '
@echo ' make rsync_upload upload the web site via rsync+ssh '
@echo ' make dropbox_upload upload the web site via Dropbox '
@echo ' make ftp_upload upload the web site via FTP '
@echo ' make s3_upload upload the web site via S3 '
@echo ' make cf_upload upload the web site via Cloud Files'
@echo ' make github upload the web site via gh-pages '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
@echo ' '
html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
regenerate:
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
serve:
ifdef PORT
cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT)
else
cd $(OUTPUTDIR) && $(PY) -m pelican.server
endif
devserver:
ifdef PORT
$(BASEDIR)/develop_server.sh restart $(PORT)
else
$(BASEDIR)/develop_server.sh restart
endif
stopserver:
kill -9 `cat pelican.pid`
kill -9 `cat srv.pid`
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
ssh_upload: publish
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
rsync_upload: publish
rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
dropbox_upload: publish
cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR)
ftp_upload: publish
lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"
s3_upload: publish
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed
cf_upload: publish
cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) .
github: publish
ghp-import $(OUTPUTDIR)
git push origin gh-pages
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github

18
README.md Normal file
View file

@ -0,0 +1,18 @@
# libskia->display(blog); #
## Installing ##
Simply run:
git clone https://git.libskia.so/skia/blog.git
## Writing content ##
Just follow [official Pelican doc](http://docs.getpelican.com/en/latest/) in order to use the site properly!
# dev-hyask #
The theme is freely based on [dev-random2](https://github.com/getpelican/pelican-themes/tree/master/dev-random2).
Feel free to use it, share it, or do whatever you want with it, according to the *DO WHAT THE FUCK YOU WANT TO PUBLIC
LICENSE*, under which this theme is placed. This means that you are not allowed to do anything if you do not want to!

24
content/24h-at-airport.md Normal file
View file

@ -0,0 +1,24 @@
title: 24h in the airport
date: 2015-04-27
tags: trip, adventure
slug: 24h-in-he-airport
category: trip
lang: en
summary: How I slothed 24h in an airport
Being in holidays for two days, I had last month bought my tickets to go to
Nothern Ireland with a friend. We arrived at the airport at least half an hour
before the time that was written in the email we received, but when asking for
the boarding pass, we were refused because it was apparently too late... I never
really travelled by plane in a big airport, so I didn't know that we should have
arrived at least one hour earlier to get the flight.
We managed to change the ticket for the following day (today!) but we had to
wait for the 24h in the airport, without anything but my small travelling bag
and my laptop...
This resulted in some [useless things](https://libskia.so/pub/darkvador.sh), but
also some more useful [r2 commits](http://rada.re). This was anyway really
tiresome, noisy, and boring to death, and I wish it won't happen again (for the
comeback trip, for example :D)

32
content/clearing.rst Normal file
View file

@ -0,0 +1,32 @@
Clearing my mind about my task
##############################
:date: 2014-07-10 00:35
:tags: rsoc
:slug: clearing
:category: rsoc
:lang: en
:summary: Getting a better view on what I'm supposed to do...
After receiving XVilka's mail, asking for our status about the RSoC, I was asked
to join the #radare-rsoc channel, a very smaller chan much more adapted to the
student of the RSoC. If I say that, it's because despite everybody says "feel
free to..." on the main chan, I really felt outnumbered by so many people
talking about such advanced things, and honestly, I didn't dare to ask even a
small question... Stupid life.... :)
Anyway, after joining the RSoC chan, I explained what I had already done, and I
was answered that many things were already done! In fact, the biggest part was
mainly done, and for now, the priority was to write tests for the 'pf' command,
the one that make use of a kind of template (my task)...
I quickly went to the test directory, forked the `radare2-regressions`_ repo on my
Github, and began to learn how 'pf' worked, in order to test it in the test
suite. Two hours or three later, my commits were merged, and I even discovered
my first bug in r2, as pancake said when I wondered about the result of a
command...
Next step now is to fix the bugs in 'pf', then to improve it to support nested
types, and then, we'll see...
.. _radare2-regressions : https://github.com/radare/radare2-regressions

View file

@ -0,0 +1,39 @@
First step in the RSoC
#########################
:date: 2014-06-26 02:06
:tags: rsoc, first step
:slug: first-step-rsoc
:category: rsoc
:lang: en
:summary: First small work for Radare2
A friend_ of mine motivated me for doing the `Radare Summer of Code`_ a few
month ago. I took a look, and found it very interesting, so I applied, asking to
do the Struct Templates job. I was accepted, and I began to take some interest
to the project. I did a very few commit here and there, trying to understand how
the project worked, how it was organized, and also learning how to use the
differents tools, like GitHub that I had never really known before.
The start was given last week, but having a project_ to finish for the
school, I had no time to take it...
Now that the project is done, I'll have more time to spend on r2, and it's what
I've done tonight: I looked precisely at some file, trying to understand how the
thing was done, and beginning to think what I'll have to do to complete the
task.
I really feel happy that the school project was a compiler and not some other
shit, because reading a C parser is now far easier than it would have been
otherwise! As we could say in Molière's tongue: *C'est en forgeant que l'on
devient forgeron* (*Smithing makes the smith*, or more likely *Practice makes
perfect*) and as we all know, that's really true for programming!
Concerning that blog, I'll try to post for every step I'll complete, in
order to keep something about my first commitment in a free project! And if you
want to contribute to r2, you can find a list of idea there_ and join us on
freenode#radare!
.. _friend : https://dustri.org/b/
.. _Radare Summer of Code : http://rada.re/rsoc/
.. _project : http://pike.tf/skia/git/?p=compiler.git
.. _there : https://pad.nopcode.org/p/r.kbQMywcnKtU6z6wn

19
content/gogs.md Normal file
View file

@ -0,0 +1,19 @@
title: Discovering Gogs
date: 2015-06-11
tags: git, gogs
slug: discovering-gogs
category: git
lang: en
summary: Just another Git web frontend
I just discovered [Gogs](http://gogs.io/), a light Git web fronted written in
Go. After reading a bit on its website, I decided to try a bit, just for fun. It
was *really* easy to install it with NginX as reverse proxy, everything is Gogs'
documentation, and it was ready in less than 10 minutes. Wonderful!
It's still in beta, but already very functionnal, providing most of the classic
features such as issues, milestones, ssh keys, *README.md* parser, etc...
Finally, I just dropped my old Gitweb[^1], and I welcome you to my new [Gogs](https://git.libskia.so/skia)! :)
[^1]: even if you can still reach it though [*http*](http://git.libskia.so)

BIN
content/images/loozip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
content/images/x60-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
content/images/x60-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
content/images/x60-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
content/images/x60-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

24
content/loosezip.md Normal file
View file

@ -0,0 +1,24 @@
title: Using WinZip
date: 2015-04-10
tags: winzip
slug: loose-zip
category: windows
lang: en
summary: Trying to use Winzip
This morning, I decided to beginmy AI course project, so I went to my
[professor's library's website](http://www.ipseity-project.com/) to download it and see how it worked.
So I had now two zip files, that I tried to unzip without success. Unzip says
**End-of-central-directory signature not found.**, and 7z says
**Unsupported Method** for every non directory file... Weird...
Okay, no problem, the binaries are only for W$, so the zip must have been done
with WinZip, or some other strange archieving tool. I was at school, so I had a
few time to try using Wine and WinZip on my X31. Great idea!
Wine went without problem, but I gave up when I faced the following error:
![screenshot](images/loozip.png)
I really thank you, WinZip, for giving me so much fun this morning! :)

20
content/new-blog-en.rst Normal file
View file

@ -0,0 +1,20 @@
A very new blog
###############
:date: 2014-06-20 19:43
:tags: blog, me, first step
:slug: new-blog
:category: blog
:summary: Short presentation
:lang: en
Hi there!
I'm proud to annonce to the world that I'm at least opening a blog. The purpose
isn't to tell you everything about my super life, but to provide informations
about interessant (or not) stuff I've done...
Feel free to contact me if you think you have to!
-- Skia --

21
content/new-blog-fr.rst Normal file
View file

@ -0,0 +1,21 @@
Un blog tout neuf
#################
:date: 2014-06-20 19:43
:tags: blog, me, first step
:slug: new-blog
:category: blog
:summary: Pourquoi ce blog?
:lang: fr
Salut à tous!
me voilà tout fier de vous annoncer enfin la création de ce blog. Le but n'est
pas ici de vous exposer ma super vie sous toutes ses coutures, mais plutôt de
rediger des articles et de fournir des informations sur tout ce que j'aurai pu
faire d'intéressant (ou pas)...
N'hésitez pas à me contacter si vous en sentez le besoin!
-- Skia --

View file

@ -0,0 +1,38 @@
title: A new motherboard for my X60
date: 2015-04-21
tags: x60 coreboot libreboot hardware
slug: new-motherboard
category: hardware
lang: en
summary: Putting in place my new Thinkpad X60 motherboard
A few weeks ago, I was playing putting water on my thinkpad, because it can
normally handle it, and mostly because a friend of mine didn't believed it. The
water went as usual through the laptop, but this time, I think I put a little
too much, and I broke the battery loading circuits.
The result was a perfectly working motherboard, but the battery was not able to
charge. That was a little embarassing, and I decided to completely take the
laptop apart to see 1) if I could see something strange around the battery, and
2) how the laptop was built exactly.
1) showed nothing, but even better, it bricked the board... Watching
[libreboot](http://libreboot.org)'s output did not really helped, because I'm
not a coreboot dev, and because it worked until a moment where it juste stopped,
without error... Hard to debug...
Still, I really needed that laptop, because during that period, I had dug my old
X31 up, but this one was a bit too slow, so I bought on Ebay a second-hand
motherboard for only 9€!
Putting it into the X60 went pretty good (I love how the thinkpad is done,
btw!), but I faced a strange matter: the Lenovo bios couldn't boot with my
Atheros Wifi card. Anyway, this was only one more good reason the flash
libreboot, because it worked very good on the old motherboard, and I wanted to
it myself at least once (first time, I bought the laptop from
[Gluglug](http://shop.gluglug.org.uk/) and it came preflashed).
This went very well thanks to libreboot's
[tutorial](http://libreboot.org/docs/install/index.html#flashrom_lenovobios) and
I was now able to use my laptop with a very new and state-of-the-art software
for an even better hardware!

123
content/rsoc-end.rst Normal file
View file

@ -0,0 +1,123 @@
The RSoC is finished
####################
:date: 2014-11-26 23:45
:tags: rsoc
:slug: rsoc-end
:category: rsoc
:lang: en
:summary: The RSoC is finished
That's sad, I know, but the RSoC is now finished since 2 months and I havn't
post for even longer! :/
I have done quit a few commits this summer, and that was really nice to
implement new features in a project such as radare2_! Still, I have some regrets
not to have had enough time for the RSoC... I had no time to implement all the
task I was given, and I even still have some that I hope to do in the next few
weeks.
And this year, having a lot of responsibilities in my school's associations, and
having a few school projects, I find even less time than this summer, so I
don't think I'll be able to contribute a lot as I expected.
Now stop complaining about my free time and let's do a quick summary of what
I've done. The task was about structure templates, so the goal is to define a
human readable structure, a bit like a C header for example, and to apply it on
a binary to see each field easily. The method with header file is quickly
described here_, and I think I'll do a more complete example one day.
But my work was more focused on one r2 feature related to structures: **pf**.
That is the basic command for which you can have a quick help on r2 by hitting
**pf?**.
The command works as follow::
pf iwf foo bar troll
applies the *iwf* format at current offset. The *iwf* format is an integer named
**foo**, a word called **bar**, and a float, **troll**. This gives the
following output::
[0x00000000]> pf iwf foo bar troll
foo : 0x00000000 = 1179403647
bar : 0x00000004 = 0x0101
troll : 0x00000006 = 1.000000
More fields type can be easily found in the pf help.
Moreover, pf supports some nice tricks like pointers by using `*` or arrays using
`[]`... eg::
pf *i[2]w pointer_to_int array_of_words
The next point is to store a format by entering following command::
pf.name iwf foo bar meh
We can now apply the format with **pf.name**. But the thing is that we can now
use the stored format as a structure in a new format using `?`. eg::
[0x00000000]> pf.meh iw int word
[0x00000000]> pf.boh i?w otherint (meh)plop otherword
[0x00000000]> pf.boh
otherint : 0x00000000 = 1179403647
plop : struct<meh>
int : 0x00000004 = 65793
word : 0x00000008 = 0x0000
otherword : 0x0000000a = 0x0000
That way, you can define linked lists for example, to apply on memory dumps, or
create nested structures for complex templates.
Other features are the JSON output, with **pfj**, or the already done templates
such as the elf32 header that you can easily load with **pfo elf32**.
On last thing is the writing mode (not fully supported for arrays and nested
structs, which are my remaining tasks) that you can use that way. You define a
format::
pf.name iwf foo bar meh
And then you can modify its field with::
pf.name.bar=0xfa0
That prints the command you should have to type to write 0xfa0 at the right
offset, and a bit of r2 shell makes life easy (see the dot before the command,
to execute the output of it as if entered in r2)::
[0x00000000]> pf.name
foo : 0x00000000 = 0
bar : 0x00000004 = 0x0000
meh : 0x00000006 = 0.000000
[0x00000000]> .pf.name.bar=0xfa0
[0x00000000]> pf.name
foo : 0x00000000 = 0
bar : 0x00000004 = 0x0fa0
meh : 0x00000006 = 0.000000
There are still some features in pf, but I think you now have a good overview of
what **pf** can do, and so what I've done during my RSoC.
To sum up, that was a great wonderful experience, and I've learned a lot of
various interesting things. I hope to finish the last tasks soon, and after
that, **pf** will really be a powerful tool to dump nice elf headers, or analyse
strange corrupted PNG files! :)
Finally, I really thank my mentors pancake_, xvilka_, and jvoisin_ for helping
me doing the task, and for organizing the RSoC in general. I also thank maijin_
for having done a lot of tests in **pf** and for reporting a lot of unexpected
features, and I also thank all the r2 community for being nice on the IRC chan,
and for supporting such a great project!
.. _radare2 : https://radare.org/
.. _here : http://radare.today/types/
.. _pancake : https://twitter.com/trufae
.. _xvilka: https://github.com/XVilka
.. _jvoisin: https://dustri.org/
.. _maijin: https://github.com/Maijin

101
content/sauvetage.rst Normal file
View file

@ -0,0 +1,101 @@
Sauvetage d'un serveur
######################
:date: 2015-01-30 01:35
:tags: sauvetage
:slug: sauvetage
:category: server
:lang: fr
:summary: Comment récupérer l'accès après un accident...
Un petit déterrage pour ce premier post de 2015. Il s'agit là simplement d'un
article que j'avais rédigé dans un wiki, et qui est resté depuis le seul article
du dit wiki. Plutôt donc de le laisser moisir, je le ressors ici, où il aura un
peu plus sa place... :)
Récupération d'un serveur perdu
===============================
Le problème
-----------
Au cours de manipulation visants à augmenter la sécurité du serveur, j'ai
malheureusement un peu trop joué avec les droits, ce qui fait qu'en essayant de
se connecter via ssh, celui-ci, après avoir afficher les quelques lignes de
bienvenue et au moment de lancer le shell:
::
/bin/zsh: permission denied
connection to pike.tf closed
Plutôt problématique, n'est-ce pas?
La solution
-----------
Comme tout problème a une solution, il fallait donc la trouver. Fort
heureusement, on pouvait toujours envoyer des fichiers par FTP dans le dossier
root d'apache, donc on pouvait uploader un script PHP qui nous sauverait la vie.
J'ai testé quelques script codés moi même, mais finalement, j'ai plutôt utilisé
un reverse shell, bien plus pratique pour tester différentes commandes.
Le script est dispo ici :
http://pentestmonkey.net/tools/web-shells/php-reverse-shell . Tout y est très
bien expliqué et l'on obtient rapidement un pseudo shell sur notre machine
locale.
Un autre problème se posait alors à moi: il fallait que j'execute une commande
avec les droits root pour chmoder les fichiers de zsh. Pour cela, deux options:
'su' et 'sudo'. Mais en faisant 'su', la commande nous répond
::
su: must be run from a terminal
Pour sudo, le problème est différent. La commande fonctionnait tout à fait, sauf
que le script qui l'execute est lancé par www-data, l'user d'apache, et celui-ci
n'est pas dans le sudoers, donc il ne peut rien faire.
J'ai donc trouvé une nouvelle astuce sur cette page : http://evertpot.com/189/ ,
qui donne deux lignes à rentrer dans notre pseudo shell pour executer un "vrai"
shell via python. Bien sûr, il faut que Python soit installé sur le serveur, ce
qui était notre cas.
La première ligne créer un script placé dans /tmp, et la deuxième l'execute,
nous donnant un shell dans lequel on peut ensuite executer 'su' sans aucun
problème.
En résumé
---------
* Uploader la page de script du reverse-shell une fois modifiée, comme indiquée
sur le site, en spécifiant l'adresse IP de la machine local sur laquelle vous
obtiendrez le pseudo shell, ainsi qu'un port disponible sur lequel vous allez
pouvoir faire écouter votre machine. Attention, si vous êtes derrière une box,
penser à forwarder le port!
* Lancer la commande 'nc' avec les options qui vont bien sur votre machine pour
qu'elle soit prête à écouter sur le port, par exemple avec le port 1234:
::
nc -v -n -l -p 1234
* Lancer le script en accédant à son URL dans votre naviguateur, votre
pseudo-shell est alors disponible là où vous aviez lancé netcat
* Executer les deux commande Python pour avoir ensuite un vrai shell et pouvoir
lancer 'su'
::
echo "import pty;
pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.py
Voilà, vous pouvez désormais récupérer votre serveur!
Merci à Dustri_ pour les nombreuses indications fournies pendant la récupération! :)
.. _Dustri : http://dustri.org

31
content/ssl.rst Normal file
View file

@ -0,0 +1,31 @@
Putting HTTPS in place
########################
:date: 2015-01-30 02:35
:tags: https ssl
:slug: ssl-at-least
:category: security
:lang: en
:summary: At least deploying secure connections
For a few time I have set up this blog, and I always said that I should put SSL
in place, to provide secure connection for most of the hosted services.
Now it's done!
Certification was made by CACert_, and this went pretty quick, thanks to a few
`Nginx tutorials`_, and the `CACert presentation by S. Bortzmeyer`_ (in French).
That wasn't so hard, after all, and I still wonder why it took me so much
time... :/
Memo:
::
openssl req -new -days 365 -nodes -newkey rsa:2048 -keyout libskia.so.key -out libskia.so.csr
.. _CACert : https://www.cacert.org/
.. _Nginx tutorials : https://www.linode.com/docs/security/ssl/ssl-certificates-with-nginx/
.. _CACert presentation by S. Bortzmeyer : http://www.bortzmeyer.org/cacert.html

48
content/sslh.md Normal file
View file

@ -0,0 +1,48 @@
title: SSLH, ssh&co though Proxies
date: 2015-11-09
tags: ssh, sysadmin, sslh
slug: sslh
category: sysadmin
lang: en
summary: Using SSH though proxies, hotspots, etc...
During my intership, I wanted to access my server, to continue using IRC in my
[irssi](http://www.irssi.org/). I need for that to ssh to
[libskia.so](https://libskia.so), but the problem came from the proxy that
provide my Internet connection, because it's blocking everything except ports 80
and 443.
First thought: easy, I just have to set SSH to listen on port 443!
Problem: we ([Piké](https://smagnin.org/) and I), are running website with [HTTPS](https://en.wikipedia.org/wiki/HTTPS)
enabled, and it's running, of course, on port 443.
From there, I had many solutions. I could put in place a VPN using some option
like
[port-share](https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage#lbAH)
but it was a bit heavy for just an SSH connection... Moreover, VPNs are stictly
forbidden by the local policy, so it wasn't a really good idea.
I also could have used [GoTTY](https://github.com/yudai/gotty), to get a shell
in my browser, but I didn't really like this solution, especially for IRC
notifications, that are forwarded though screen to my terminal, to have a little
"beep" when someone highlights me.
I finally found a far better solution:
[SSLH](http://www.rutschle.net/tech/sslh.shtml). It's a small SSL multiplexer
that, once set to listen on `$PUBLIC_IP:443`, can forward many protocols to their
respective interfaces.
Here is how I call SSLH. You can of course set it in */etc/default/sslh* and run
it as a daemon.
:::bash
sslh --user sslh --listen 91.121.195.132:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 --openvpn 127.0.0.1:1194
That way, I have SSH, HTTPS, and even OpenVPN that can pass through port 443, and
that's very useful when you work behind weird restrictive proxies!
**Bonus**: that works in both sides, so when you have server in a DMZ where, for
*security reasons*, the network admin blocked SSH port, but allowed, say, HTTPS
for example, you can have a direct secure shell without any weird reverse tunnel
with SSLH.

View file

@ -0,0 +1,47 @@
title: La Force s'est réveillée...
date: 2015-12-16
tags: star wars, force, jedi, geek
slug: the-force-has-awoken
category: starwars
lang: fr
summary: Comment la Force s'est réveillée il y a bien longtemps, dans le coeur d'un jeune Jedi...
Nous sommes aujourd'hui le 16 Décembre, et le monde (au moins la France) voit la sortie de **Star Wars VII: Le réveil de
la Force**. Pour cette occasion, je prends le temps de rédiger ces lignes pour vous raconter comment j'ai toujours adoré
l'univers de *Star Wars*!
Tout à commencé le jour où j'ai vu **Un Nouvel Espoir** (je ne me rappel plus quand exactement, mais j'étais jeune).
Depuis, j'ai grandi, tantôt [jouant au Maître Jedi](https://www.youtube.com/watch?v=HoRXYZD0Zc8), tantôt à faisant des
films en stop motion avec mes Lego (que j'ai malheureusement perdu), parfois [devenant un seigneur
Sith](https://www.youtube.com/watch?v=gmVg-ubmlJo), quand je n'étais pas trop occupé à collectionner et jouer avec ma
quinzaine de vaisseaux Lego et ma trentaine de personnage!
J'ai continué d'explorer l'univers de *Star Wars* [lisant](http://starwars.wikia.com/wiki/The_Thrawn_trilogy) des
[livres](http://starwars.wikia.com/wiki/Darth_Maul:_Shadow_Hunter),
[jouant](http://starwars.wikia.com/wiki/Star_Wars:_Jedi_Knight:_Jedi_Academy) à des
[jeux](http://starwars.wikia.com/wiki/Republic_Commando)-[vidéo](http://starwars.wikia.com/wiki/KOTOR), et encore
maintenant, jouant un vagabond [Kiffar](http://starwars.wikia.com/wiki/Kiffar), perdu, Jedi en devenir, dans un
[super Jeu de Rôle](https://libskia.so/pub/Star-Wars-Fate-Edition.pdf)!
Et aujourd'hui, je suis on ne peut plus heureux de voir que l'univers continue de vivre à travers un tout nouveau film!
Beaucoup de gens m'ont demandé ce que je pensais du rachat de Lucasfilm par Disney, et j'ai toujours répondu que j'en
étais ravi.
Ravi que cela se passe tant que George Lucas n'a pas encore rejoint la Force (malheureusement, ça arrivera).
Ravi parce que Disney ont de l'argent, et qu'ils en mettent une partie pour refaire du *Star Wars*.
Ravi parce qu'ils ont fait confiance à J.J. Abrams pour faire ce film, et que je trouve qu'il a fait un plutôt bon
travail avec les derniers *Star Trek*.
Ravi de pouvoir revoir les vieux personnages joués par les vieux acteurs, et que je sais déjà que ça sera un moment
magique!
Ravi parce qu'au moment ou j'écris ces lignes, j'écoute la bande originale composée par John Williams pour les deux
premières trilogies, et que je suis vraiment content qu'il en fasse une troisième!
D'une manière générale, je suis aussi très content de la façon dont Disney a réussi à garder l'univers étendu existant
en créant la [Légende](http://starwars.wikia.com/wiki/Star_Wars_Legends), sans pour autant être coincé pour le nouveau
film par cet univers. Il aurait été quasi impossible de conserver la cohérence tout en reprenant des anciens personnages
et lieux.
Pour finir, j'attends toujours patiemment de voir le réveil de la Force, même si je sais qu'en moi, la Force s'est déjà
réveillée *il y a bien longtemps...*

View file

@ -0,0 +1,45 @@
title: The Force has awoken...
date: 2015-12-16
tags: star wars, force, jedi, geek
slug: the-force-has-awoken
category: starwars
lang: en
summary: How the Force has long ago awoken in the heart of a small Jedi...
Today is the 16th December, and the world (at least the France) sees the release of **Star Wars VII: The Force
Awakens**. In this special occasion, I take the time to write a bit about how much I've been loving the *Star Wars*
universe, and that for a very long time!
It all began when I first saw **A New Hope** when I was young (I don't remember precisly when). Since then, I grew
up [playing the Jedi master](https://www.youtube.com/watch?v=HoRXYZD0Zc8), making stop-motion Star Wars Lego movies
(that I sadly lost), even [becoming sometimes a Sith Lord](https://www.youtube.com/watch?v=gmVg-ubmlJo), when not too
busy collecting/playing with about fifteen Lego spaceships, and more than thirty characters!
I continued exploring the Star Wars universe [reading](http://starwars.wikia.com/wiki/The_Thrawn_trilogy)
[books](http://starwars.wikia.com/wiki/Darth_Maul:_Shadow_Hunter),
[playing](http://starwars.wikia.com/wiki/Star_Wars:_Jedi_Knight:_Jedi_Academy)
[video](http://starwars.wikia.com/wiki/Republic_Commando)-[games](http://starwars.wikia.com/wiki/KOTOR), and still now
playing a lost, Jedi to become, [Kiffar](http://starwars.wikia.com/wiki/Kiffar) vagabond, in a [very cool role-playing
game](https://libskia.so/pub/Star-Wars-Fate-Edition.pdf)!
And today, I'm very happy that the universe continues to live through a new movie!
Many people have asked me how I felt about Lucasfilm beeing sold to Disney, and I always answered that it was great.
It's great to do so while George Lucas has not yet joined the Force (sadly, it will happen).
It's great to do so because Disney has a lot of money, and it's great that they use it to make more Star Wars stuff.
It's great because they trusted J.J. Abrams to make this new movie, and I think he has done a good job previously with
the new Star Trek films.
It's great because we will see the old characters played by the old actors, and I already know that it will be a magic
moment!
It's great because while writing these lines, I'm listening to the soundtrack that made John Williams for the first and
second trilogy, and I'm really happy that he doing a third one!
More generally, I'm also very happy with how Disney managed to keep the giant extended-universe by creating the
[Legend](http://starwars.wikia.com/wiki/Star_Wars_Legends), without beeing hold back for the new films. Indeed,
keeping the universe consistant would have been almost impossible without using a entire new place, with very few
references to the old movies.
That said, I'm still waiting patiently to see the awaken of the Force, although I know that within me, it already awoke
*a long time ago...*

View file

@ -0,0 +1,30 @@
title: Strange high ping
date: 2015-04-20
tags: network
slug: strange-high-ping
category: network
lang: en
summary: Fixing a strangly high ping with a Proxmox 3.4 VM
Currently rebuilding my student association's infrastructure, I have to deal
with Proxmox 3.4 quit a lot. Having up to 5 VM, I decided to first install one,
called **generic**, that I would backup, then restore 5 times to get all my VM
with a basic configuration without efforts.
That worked perfectly a first time, and I have been able to deploy our
[Gitlab](https://about.gitlab.com/) quit quickly.
Then I wanted to work on our **proxy** VM, so I restored the generic image, and
logged into the VM with the console interface to change at least its name and
IP. After that, I was able to ssh to the machine, but I remarked that when
typing a command, it was really slow to answer.
Some quick ping based investigations told me that there were many lost packages,
and the average ping was up to half a second! Of course, everything was in a
local network, and pinging the Proxmox host was pretty normal, just as the first
Gitlab VM. Why was that second machine causing so much trouble?
The answer was very dummy: restoring an image restores really everything, and
even the MAC address! Changing that address fixed the problem, but that story
reminds me how shitty I am with networks! :D

47
content/x60.rst Normal file
View file

@ -0,0 +1,47 @@
Open Laptop
###########
:date: 2014-07-13 03:20
:tags: laptop, x60, thinkpad
:slug: open-laptop
:category: fun
:lang: en
:summary: Cooling my open-laptop by opening it... o.O Okay, that was mainly for
drying it... and for fun!
First, let me introduce my laptop: it's a Thinkpad X60, he's called `Kiffu`_ and was bought ~6 months
ago from `Gluglug`_, and as the `FSF`_ said, it's an open-laptop, and that means
that it runs without any proprietary software, nor any blob, not even the CPU
microcode!
Yesterday, I decided to clean my keyboard, and for that, `Maat`_ and I had no better idea than
putting it under the tap! Of course it was powered off, but I put a bit too much
of water, and everything didn't go though it. It was now a bit wet, and I
decided to wait for the full night before pluging and running it again... But
the whole night wasn't enough, and when I ran it, it worked for five minutes,
and then I got some strange things on the screen, before it self rebooted, then
reboot again, and behaved very oddly... I shut it down, removed the battery,
unpluged, and decided to dry it **really**. I opened it completely, removed the
SSD, the keyboard, and even the upper body! Drying and waiting for a bit, I then
decided to try to run it, but I was too lazy to rebuild it, and then redry if it
still didn't worked, so I run it completly opened!
Everything went well, and I even took a few pictures with the webcam, without
any problems:
|pict1|
|pict2|
|pict3|
|pict4|
Finally, I just rebuilt the laptop and wrote this article, because I just found
that fun and wanted to share the pictures... ;)
.. _Kiffu : http://starwars.wikia.com/wiki/Kiffu
.. _Gluglug : http://www.gluglug.org.uk/
.. _FSF : https://www.fsf.org/
.. _Maat : http://maat.mooo.com/
.. |pict1| image:: images/x60-1.jpg
.. |pict2| image:: images/x60-2.jpg
.. |pict3| image:: images/x60-3.jpg
.. |pict4| image:: images/x60-4.jpg

500
dev-hyask/static/css/normalize.css vendored Normal file
View file

@ -0,0 +1,500 @@
/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects `block` display not defined in IE6/7/8/9 & FF3.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects `inline-block` display not defined in IE6/7/8/9 & FF3.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4.
* Known issue: no IE6 support.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/*
* 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using
* `em` units.
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-size: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Addresses `font-family` inconsistency between `textarea` and other form
* elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/*
* Addresses margins handled incorrectly in IE6/7.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers.
* people.opera.com/patrickl/experiments/keyboard/test
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/*
* Addresses font sizes and margins set differently in IE6/7.
* Addresses font sizes within `section` and `article` in FF4+, Chrome, S5.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.75em;
margin: 2.33em 0;
}
/*
* Addresses styling not present in IE7/8/9, S5, Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to `bolder` in FF3+, S4/5, Chrome.
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/*
* Addresses styling not present in S5, Chrome.
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE6/7/8/9.
*/
mark {
background: #ff0;
color: #000;
}
/*
* Addresses margins set differently in IE6/7.
*/
p,
pre {
margin: 1em 0;
}
/*
* Corrects font family set oddly in IE6, S4/5, Chrome.
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Addresses CSS quotes not supported in IE6/7.
*/
q {
quotes: none;
}
/*
* Addresses `quotes` property not supported in S4.
*/
q:before,
q:after {
content: '';
content: none;
}
small {
font-size: 75%;
}
/*
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
* gist.github.com/413930
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/*
* Addresses margins set differently in IE6/7.
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/*
* Addresses paddings set differently in IE6/7.
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/*
* Corrects list images handled incorrectly in IE7.
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
/* ==========================================================================
Embedded content
========================================================================== */
/*
* 1. Removes border when inside `a` element in IE6/7/8/9, FF3.
* 2. Improves image quality when scaled in IE7.
* code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/*
* Corrects overflow displayed oddly in IE9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE6/7/8/9, S5, O11.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/*
* Corrects margin displayed oddly in IE6/7.
*/
form {
margin: 0;
}
/*
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE6/7/8/9.
* 2. Corrects text not wrapping in FF3.
* 3. Corrects alignment displayed oddly in IE6/7.
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/*
* 1. Corrects font size not being inherited in all browsers.
* 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome.
* 3. Improves appearance and consistency in all browsers.
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/*
* Addresses FF3/4 setting `line-height` on `input` using `!important` in the
* UA stylesheet.
*/
button,
input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
* 4. Removes inner spacing in IE7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE6.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/*
* Re-set default cursor for disabled elements.
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to content-box in IE8/9.
* 2. Removes excess padding in IE8/9.
* 3. Removes excess padding in IE7.
* Known issue: excess padding remains in IE6.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in S5, Chrome.
* 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz`
* to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in S5, Chrome on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in FF3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE6/7/8/9.
* 2. Improves readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View file

@ -0,0 +1,62 @@
pre .hll { background-color: #ffffcc }
pre { background: #000000; color: #F5F5F5;}
pre .c { color: #808080 } /* Comment */
pre .err { color: #F00000; background-color: #F0A0A0 } /* Error */
pre .k { color: #008000; font-weight: bold } /* Keyword */
pre .o { color: #303030 } /* Operator */
pre .cm { color: #808080 } /* Comment.Multiline */
pre .cp { color: #507090 } /* Comment.Preproc */
pre .c1 { color: #808080 } /* Comment.Single */
pre .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
pre .gd { color: #A00000 } /* Generic.Deleted */
pre .ge { font-style: italic } /* Generic.Emph */
pre .gr { color: #FF0000 } /* Generic.Error */
pre .gh { color: #000080; font-weight: bold } /* Generic.Heading */
pre .gi { color: #00A000 } /* Generic.Inserted */
pre .go { color: #808080 } /* Generic.Output */
pre .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
pre .gs { font-weight: bold } /* Generic.Strong */
pre .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
pre .gt { color: #0040D0 } /* Generic.Traceback */
pre .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
pre .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
pre .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
pre .kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */
pre .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
pre .kt { color: #303090; font-weight: bold } /* Keyword.Type */
pre .m { color: #6000E0; font-weight: bold } /* Literal.Number */
pre .s { background-color: #fff0f0 } /* Literal.String */
pre .na { color: #0000C0 } /* Name.Attribute */
pre .nb { color: #007020 } /* Name.Builtin */
pre .nc { color: #B00060; font-weight: bold } /* Name.Class */
pre .no { color: #003060; font-weight: bold } /* Name.Constant */
pre .nd { color: #505050; font-weight: bold } /* Name.Decorator */
pre .ni { color: #800000; font-weight: bold } /* Name.Entity */
pre .ne { color: #F00000; font-weight: bold } /* Name.Exception */
pre .nf { color: #0060B0; font-weight: bold } /* Name.Function */
pre .nl { color: #907000; font-weight: bold } /* Name.Label */
pre .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
pre .nt { color: #007000 } /* Name.Tag */
pre .nv { color: #906030 } /* Name.Variable */
pre .ow { color: #000000; font-weight: bold } /* Operator.Word */
pre .w { color: #bbbbbb } /* Text.Whitespace */
pre .mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */
pre .mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */
pre .mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */
pre .mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */
pre .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
pre .sc { color: #0040D0 } /* Literal.String.Char */
pre .sd { color: #D04020 } /* Literal.String.Doc */
pre .s2 { background-color: #fff0f0 } /* Literal.String.Double */
pre .se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
pre .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
pre .si { background-color: #e0e0e0 } /* Literal.String.Interpol */
pre .sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */
pre .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
pre .s1 { background-color: #fff0f0 } /* Literal.String.Single */
pre .ss { color: #A06000 } /* Literal.String.Symbol */
pre .bp { color: #007020 } /* Name.Builtin.Pseudo */
pre .vc { color: #306090 } /* Name.Variable.Class */
pre .vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */
pre .vi { color: #3030B0 } /* Name.Variable.Instance */
pre .il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */

74
dev-hyask/static/css/skeleton.css vendored Normal file
View file

@ -0,0 +1,74 @@
/* vim: ts=4 sw=4 et: */
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#page {
max-width: 900px;
min-width: 240px;
margin: 0 auto;
padding: 0;
}
#page-head,
#page-body,
#page-foot {
clear: both;
margin: 0;
padding: 0;
}
#page-body { margin: 0 1em; }
#page-main, #page-side {
border-width: 0;
}
#page-side {
float: left;
width: 20%;
height: 100%;
margin-top: 0;
}
#page-main {
float: right;
height: 100%;
width: 80%;
}
.post-content img {
max-width: 100%;
}
@media screen and (max-width: 550px) {
#page-main,
#page-side {
width: auto;
clear: both;
float: none;
}
#page-side ul {
column-count: 2;
-moz-column-count: 2;
-webkit-column-count: 2;
-o-column-count: 2;
-ms-column-count: 2;
}
}
@media screen and (max-width: 490px) {
#page-side ul {
column-count: auto;
-moz-column-count: auto;
-webkit-column-count: auto;
-o-column-count: auto;
-ms-column-count: auto;
}
}

View file

@ -0,0 +1,229 @@
/* vim: set ts=4 sw=4 et: */
@import url(normalize.css);
@-webkit-keyframes fade {from {opacity: 0;} to { opacity: 1;}}
@-moz-keyframes fade {from {opacity: 0;} to { opacity: 1;}}
@-ms-keyframes fade {from {opacity: 0;} to { opacity: 1;}}
@-o-keyframes fade {from {opacity: 0;} to { opacity: 1;}}
@keyframes fade {from {opacity: 0;} to { opacity: 1;}}
body {
font-family: "Lucida Grande", "Gargi_1.7", "Garuda", "Jamrul", "Loma", "Malayalam", "Mukti Narrow", sans-serif;
font-size: 16px;
line-height: 1.5em;
color: #444;
background-color: #cccccc;
/* background-color: #FAFAFA; */
-webkit-animation: fade 600ms 1 ease-in-out;
-moz-animation: fade 600ms 1 ease-in-out;
-ms-animation: fade 600ms 1 ease-in-out;
-o-animation: fade 600ms 1 ease-in-out;
animation: fade 600ms 1 ease-in-out;
}
h1, h2, h3,
h4, h5, h6,
.meta {
color: #222;
font-family: "Century Schoolbook L", "Georgia", "Nimbus Roman No9 L", "Norasi", "Rekha", serif;
line-height: 1.1em;
}
hr {
visibility: hidden;
padding-bottom: 1em;
}
hr:after,
#page-foot:before {
visibility: visible;
content: '\2042';
display: block;
text-align: center;
}
article {
margin-bottom: 4em;
}
article header h1 {
padding: .1em 0;
margin: 0;
}
article header .meta {
font-size: .9em;
}
article header .meta a { text-decoration: none; }
article:after {
content: '\00A7';
display: block;
text-align: center;
font-weight: lighter;
font-size: 1.5em;
}
article:last-of-type:after {
content: '';
}
#home-page {
left: 30px;
position: absolute;
}
#home-page h3 {
font-family: monospace;
font-weight: normal;
}
#page-head {
text-align: center;
padding-top: .5em;
}
#page-head h1 {
font-size: 3em;
}
#page-head h1 a:hover {
text-decoration: none;
}
#page-side {
font-family: monospace;
line-height: 1.2em;
}
#page-side h4 {
font-family: monospace;
font-weight: normal;
margin: 1em 0 0;
}
#page-side ul {
padding: 0 0 0 1.3em;
margin: .4em 0 .6em .4em;
list-style-type: square;
}
#page-side li a {
color: #555;
}
#page-side li.active {
color: firebrick;
}
#page-side li.active a {
color: #222;
}
#page-foot {
font-size: .8em;
text-align: center;
}
#pagination {
display: block;
margin-bottom: 4em;
text-align: center;
}
#tag-cloud li {
margin: .2em 1em;
transition: transform 200ms linear;
}
#tag-cloud li a {
text-decoration: none;
color: #222;
}
#tag-cloud li:hover {
transform: rotate(0deg) scale(1.3, 1.3)!important;
}
#tag-cloud li:hover a {
color: black;
}
h1.small-title {
font-size: 1em;
font-style: italic;
font-weight: normal;
}
a, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
border: none;
text-decoration: underline;
}
a:active, a:focus {
outline-width: 1px;
outline-style: dotted;
}
h1 a, h1 a:visited,
h2 a, h2 a:visited,
h3 a, h3 a:visited,
h4 a, h4 a:visited,
h5 a, h5 a:visited,
h6 a, h6 a:visited {
color: #222;
text-decoration: none;
}
a.goto {
font-size: .8em;
color: #444;
padding: 0;
margin: 0em .2em;
}
pre, img, figure, table {
margin: 1em auto;
overflow-x: auto;
border: 3px solid silver;
}
table td, table th {
border: 1px solid silver;
padding: .15em .3em;
}
pre {
font-family: monospace;
font-size: 0.95em;
line-height: 1.15em;
background-color: #F5F5F5;
padding: 0.5em;
max-width: 100%;
}
figure * { border: none; margin: auto; padding: auto; }
@media screen and (max-width: 650px) {
body {
font-size: 15px;
}
}
@media screen and (max-width: 500px) {
body {
font-size: 14px;
}
#page-head h1 {
font-size: 2.5em;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

3
dev-hyask/static/js/html5shiv.js vendored Normal file
View file

@ -0,0 +1,3 @@
/*! HTML5 Shiv pre3.5 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
Uncompressed source: https://github.com/aFarkas/html5shiv */
(function(a,b){function h(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function i(){var a=l.elements;return typeof a=="string"?a.split(" "):a}function j(a){var b={},c=a.createElement,f=a.createDocumentFragment,g=f();a.createElement=function(a){l.shivMethods||c(a);var f;return b[a]?f=b[a].cloneNode():e.test(a)?f=(b[a]=c(a)).cloneNode():f=c(a),f.canHaveChildren&&!d.test(a)?g.appendChild(f):f},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(a){return b[a]=c(a),g.createElement(a),'c("'+a+'")'})+");return n}")(l,g)}function k(a){var b;return a.documentShived?a:(l.shivCSS&&!f&&(b=!!h(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),g||(b=!j(a)),b&&(a.documentShived=b),a)}function p(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+i().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(q(b)));return f}function q(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(n+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function r(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+n+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function s(a){var b=a.length;while(b--)a[b].removeNode()}function t(a){var b,c,d=a.namespaces,e=a.parentWindow;return!o||a.printShived?a:(typeof d[n]=="undefined"&&d.add(n),e.attachEvent("onbeforeprint",function(){var d,e,f,g=a.styleSheets,i=[],j=g.length,k=Array(j);while(j--)k[j]=g[j];while(f=k.pop())if(!f.disabled&&m.test(f.media)){for(d=f.imports,j=0,e=d.length;j<e;j++)k.push(d[j]);try{i.push(f.cssText)}catch(l){}}i=r(i.reverse().join("")),c=p(a),b=h(a,i)}),e.attachEvent("onafterprint",function(){s(c),b.removeNode(!0)}),a.printShived=!0,a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea|object|iframe)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g;(function(){var c=b.createElement("a");c.innerHTML="<xyz></xyz>",f="hidden"in c,f&&typeof injectElementWithStyles=="function"&&injectElementWithStyles("#modernizr{}",function(b){b.hidden=!0,f=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).display=="none"}),g=c.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var l={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:k};a.html5=l,k(b);var m=/^$|\b(?:all|print)\b/,n="html5shiv",o=!g&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();l.type+=" print",l.shivPrint=t,t(b)})(this,document)

View file

@ -0,0 +1,159 @@
(function(doc, win, v) {
/**
* The microTags exception
*
* @class microTags.error
* @constructor
* @param message {String} an error message
* @example
* try {
* var t = new microTags(undefined);
* }
* catch(e) {
* if (e instaceOf micrTags.error) {
* console.debug("Epic fail: " + e.message);
* }
* }
*/
function error(message) {
this.message = "microTags: " + message;
}
error.prototype = Error.prototype;
/**
* Create a new microTags instance
*
* @class microTags
* @constructor
* @param element {HTMLElement} an element containing tags
* @param options {Object} A JSON hash containing options
*/
function microTags(element, options) {
if (!(element && element.nodeName))
throw new error("argument #1 must be an HTMLElement !");
this._el = element;
this._children = element.children;
this._max_size = 3;
this._min_size = 0.7;
this._max_angle = 10;
this._min_angle = -10;
if (options != undefined)
this._set_options(options);
this._max_count = this._get_max_count();
self = this;
this.eachTag(function(element, count) {
self._make_inline(element, count);
self._set_size(element, count);
self._set_tilt(element, count);
});
}
/**
* the microTags current version
*
* @attribute version {String}
*/
microTags.prototype.version = v;
microTags.version = v;
microTags.prototype._set_options = function(options) {
var max_size = options['max-size'],
min_size = options['min-size'],
max_angle = options['max-angle'],
min_angle = options['min-angle'];
if ((max_size >= 1) && (max_size > min_size))
this._max_size = max_size;
else
throw error("option `max-size` must be >= 1 and > min-size");
if ((min_size > 0) && (min_size < max_size))
this._min_size = min_size;
else
throw error("option `min-size` must be > 0 and < max-size");
if (max_angle > min_angle) {
this._max_angle = max_angle;
this._min_angle = min_angle;
}
else
throw error("option `max-angle` must be > `min-angle`");
}
/**
* Apply a function on each tag
*
* @param [Function] callback: the function to apply
*/
microTags.prototype.eachTag = function(callback) {
var i, child, tag, count;
for (i=0; i < this._children.length; i++) {
child = this._children[i];
if (child.attributes != undefined) {
window._c = child;
count = parseInt(child.attributes["data-count"].value || "1");
callback(child, count);
}
}
}
microTags.prototype._get_max_count = function() {
var max = 0;
this.eachTag(function(element, count) {
max = (max < count) ? count : max;
});
return max;
}
microTags.prototype._make_inline = function(element, coun) {
element.style['display'] = 'inline-block';
}
microTags.prototype._set_size = function(element, count) {
var size,
max = this._max_size,
min = this._min_size,
max_count = this._max_count;
size = (count * max / max_count);
size = (size >= min) ? size : min;
element.style['fontSize'] = size + 'em';
}
microTags.prototype._set_tilt = function(element, count) {
var angle,
max = this._max_angle,
min = this._min_angle;
angle = min + (Math.random() * (max - min));
element.style['transform'] = 'rotate(' + angle + 'deg)';
element.style['MozTransform'] = 'rotate(' + angle + 'deg)';
element.style['OTransform'] = 'rotate(' + angle + 'deg)';
element.style['WebkitTransform'] = 'rotate(' + angle + 'deg)';
element.style['msTransform'] = 'rotate(' + angle + 'deg)';
}
if (win != undefined) {
win.microTags = microTags;
win.microTags.error = error;
if (win.define && win.define.call) {
win.define(function() {
return microTags;
});
}
}
})(window.document, window, "0.3.2");

18
dev-hyask/static/js/microTags.min.js vendored Normal file
View file

@ -0,0 +1,18 @@
(function(doc,win,v){function error(message){this.message="microTags: "+message;}
error.prototype=Error.prototype;function microTags(element,options){if(!(element&&element.nodeName))
throw new error("argument #1 must be an HTMLElement !");this._el=element;this._children=element.children;this._max_size=3;this._min_size=0.7;this._max_angle=10;this._min_angle=-10;if(options!=undefined)
this._set_options(options);this._max_count=this._get_max_count();self=this;this.eachTag(function(element,count){self._make_inline(element,count);self._set_size(element,count);self._set_tilt(element,count);});}
microTags.prototype.version=v;microTags.version=v;microTags.prototype._set_options=function(options){var max_size=options['max-size'],min_size=options['min-size'],max_angle=options['max-angle'],min_angle=options['min-angle'];if((max_size>=1)&&(max_size>min_size))
this._max_size=max_size;else
throw error("option `max-size` must be >= 1 and > min-size");if((min_size>0)&&(min_size<max_size))
this._min_size=min_size;else
throw error("option `min-size` must be > 0 and < max-size");if(max_angle>min_angle){this._max_angle=max_angle;this._min_angle=min_angle;}
else
throw error("option `max-angle` must be > `min-angle`");}
microTags.prototype.eachTag=function(callback){var i,child,tag,count;for(i=0;i<this._children.length;i++){child=this._children[i];if(child.attributes!=undefined){window._c=child;count=parseInt(child.attributes["data-count"].value||"1");callback(child,count);}}}
microTags.prototype._get_max_count=function(){var max=0;this.eachTag(function(element,count){max=(max<count)?count:max;});return max;}
microTags.prototype._make_inline=function(element,coun){element.style['display']='inline-block';}
microTags.prototype._set_size=function(element,count){var size,max=this._max_size,min=this._min_size,max_count=this._max_count;size=(count*max/max_count);size=(size>=min)?size:min;element.style['fontSize']=size+'em';}
microTags.prototype._set_tilt=function(element,count){var angle,max=this._max_angle,min=this._min_angle;angle=min+(Math.random()*(max-min));element.style['transform']='rotate('+angle+'deg)';element.style['MozTransform']='rotate('+angle+'deg)';element.style['OTransform']='rotate('+angle+'deg)';element.style['WebkitTransform']='rotate('+angle+'deg)';element.style['msTransform']='rotate('+angle+'deg)';}
if(win!=undefined){win.microTags=microTags;win.microTags.error=error;if(win.define&&win.define.call){win.define(function(){return microTags;});}}})(window.document,window,"0.3.2");

View file

@ -0,0 +1,29 @@
{% extends "base.html" %}
{% block content_title %}{{ SITENAME }} — Archives{% endblock %}
{%- block content %}
<h1>Archives</h1>
{% for article in articles %}
<ul>
<li>
<a rel="bookmark"
href="{{ SITEURL }}/{{ article.url }}"
title="{{ article.title|striptags }}">
{{ article.title }}</a>
-- {{ article.locale_date }}
{%- if article.translations %}
{%- if article.lang == 'fr' %}
<br />Traductions:&nbsp;
{%- else -%}
<br />Translations:&nbsp;
{%- endif -%}
[<a href="{{ SITEURL }}/{{ article.url }}">{{ article.lang or DEFAULT_LANG }}</a>]
{%- for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor -%}
{% endif -%}
</li>
</ul>
{% endfor %}
{% endblock content -%}

View file

@ -0,0 +1,39 @@
{%- if article.lang %}{% set DEFAULT_LANG = article.lang %}{% endif -%}
{% extends "base.html" %}
{% block headers %}
{{ super() }}
<meta name="keywords" content="{{ article.tags|join(', ') }}" />
<link rel="stylesheet" media="not print" type="text/css" href="{{ SITEURL }}/theme/css/pygments.css" />
{% endblock %}
{% block title %}{{ article.title }} — {{ super() }}{% endblock %}
{%- block content %}
<header class="post-header">
<h1>
<a rel="bookmark"
href="{{ SITEURL }}/{{ article.url }}"
title="Permalink to '{{ article.title|striptags }}'">
{{ article.title }}
</a>
</h1>
</header>
<div class="post-content">
{{ article.content}}
</div>
<footer class="post-footer">
<div class="meta">
{% include "includes/article_meta.html" %}
</div>
<!--
<div class="meta">
Posted in '<a href="{{ SITEURL }}/{{ article.category.url }}">{{
article.category }}</a>'
the <time datetime="{{ article.date.isoformat() }}">{{
article.locale_date }}</time><br />
Tags: {% for tag in article.tags %} <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
-->
</footer>
{% endblock content -%}

View file

@ -0,0 +1,5 @@
{% extends "index.html" %}
{% block title %}{{ super() }} — Articles de {{ author }}{% endblock %}
{% block index_title %}Articles de <i>{{ author }}</i> :{% endblock %}

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="{{ article.lang if article and article.lang else DEFAULT_LANG }}">
<head>
{% block headers %}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=endge, chrome=IE8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
<!--[if lte IE 8]><script type="text/javascript" src="{{ SITEURL }}/theme/js/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/skeleton.css" />
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/theme.css" />
<link rel="shortcut icon" type="image/png" href="{{ SITEURL }}/theme/favicon.png" />
<!--[if lte IE 8]><link rel="shortcut icon" type="image/x-icon" href="{{ SITEURL }}/favicon.ico" /><![endif]-->
<link rel="alternate" type="application/atom+xml"
title="{{ SITENAME }} — Flux Atom"
href="{{ SITEURL }}/{{ FEED_ATOM }}" />
{% if FEED_RSS %}
<link rel ="alternate" type="application/rss+xml"
title="{{ SITENAME }} — Flux RSS"
href="{{ SITEURL }}/{{ FEED_RSS }}" />
{% endif %}
{% endblock headers %}
</head>
<body>
<div id="page">
<div id="home-page">
<h3><a href="https://libskia.so">Home</a></h3>
</div>
<header id="page-head">
<h1>
<a href="{{ SITEURL }}/index.html">{{ SITENAME }}</a>
</h1>
</header>
<div id="page-body">
<{%- if article %}article class="post" {% else %}section {% endif -%}id="page-main" role="main">
{% block content %}
{% endblock content %}
</{%- if article %}article{% else %}section{% endif -%}> <!-- /#page-main -->
<aside id="page-side">
{%- include "includes/sidebar.html" -%}
</aside> <!-- /#page-side -->
</div> <!-- /#page-body -->
<footer id="page-foot">
<p> {{ FOOTER_TEXT or 'Powered by <a href="http://pelican.readthedocs.org">Pelican</a>' }}</p>
{% if GITHUB_URL %}<p><a id="github-link" href="{{ GITHUB_URL}}">Fork me on Github</a></p>{% endif %}
</footer>
</div> <!-- /#page -->
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
</body>
</html>

View file

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ super() }} — Catégories{% endblock title %}
{%- block content %}
<section class="content">
<h1>Catégories</h1>
<ul id="category-list">
{% for category, n in categories %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ n|count }} articles)</li>
{% endfor %}
</ul>
</section>
{% endblock content -%}

View file

@ -0,0 +1,5 @@
{% extends "index.html" %}
{% block title %}{{ super() }} — Articles dans la catégorie «{{ category }}»{% endblock %}
{% block index_title %}Articles dans la catégorie <i>«{{ category }}»</i> :{% endblock %}

View file

@ -0,0 +1,19 @@
<!-- includes/article_meta.html -->
<time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
{%- if article.tags %}
<br />Tags:
{%- for tag in article.tags %}
<a rel="tag" href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
{% endfor -%}
{% endif -%}
{%- if article.translations %}
{%- if article.lang == 'fr' %}
<br />Traductions:&nbsp;
{%- else -%}
<br />Translations:&nbsp;
{%- endif -%}
[<a href="{{ SITEURL }}/{{ article.url }}">{{ article.lang or DEFAULT_LANG }}</a>]
{%- for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor -%}
{% endif -%}

View file

@ -0,0 +1,67 @@
<!-- begin includes/sidebar.html -->
<p>
<strong>
Computers<br />
Drumming<br />
Fantasy<br />
Sci-Fi<br />
Metal<br />
Beer<br />
...<br />
</strong>
</p>
<nav>
<h4>Pages</h4>
<ul>
<li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
{% if DISPLAY_CATEGORIES_ON_MENU %}
<li><a href="{{ SITEURL }}/categories.html">Categories</a></li>
{% endif %}
<!-- <li><a href="{{ SITEURL }}/tags.html">Tags</a></li> -->
{% if MENUITEMS %}
{% for name, uri in MENUITEMS %}
<li><a href="{{ uri|format(SITEURL)}}">{{ name }}</a></li>
{% endfor %}
{% endif %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in PAGES %}
<li><a href="{{ SITEURL}}/{{ p.url }}"{% if p == page %} class="active"{% endif %}>{{ p.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
</nav>
{% if DISPLAY_CATEGORIES_ON_MENU %}
<nav>
<h3>Categories</h3>
<ul>
{% for cat, null in categories %}
<li{%- if cat == category %} class="active"{% endif -%}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
<nav>
<h4>Friends</h4>
<ul>
{% if FEED_ATOM %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}">Flux ATOM</a></li>
{% endif %}
{% if FEED_RSS %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}">Flux RSS</a></li>
{% endif %}
{% if SOCIAL %}
{% for name, url in SOCIAL %}
<li><a href="{{ url }}">{{ name }}</a></li>
{% endfor %}
{% endif %}
{% if LINKS %}
{% for name, url in LINKS %}
<li><a href="{{ url }}">{{ name }}</a></li>
{% endfor %}
{% endif %}
</ul>
</nav>
<!-- end includes/sidebar.html -->

View file

@ -0,0 +1,59 @@
{% extends "base.html" %}
{%- block content %}
<h1 class="small-title">{% block index_title %}All articles{% endblock index_title %}</h1>
{% for article in articles_page.object_list %}
<article class="post">
<header class="post-header">
<h1>
<a rel="bookmark"
href="{{ SITEURL }}/{{ article.url }}"
title="Lien permanent vers «{{ article.title|striptags }}»">
{{ article.title }}
</a>
</h1>
<div class="meta">
{% include "includes/article_meta.html" %}
</div>
</header>
<div class="post-content">
{{ article.summary }}
</div>
<footer class="post-footer">
<a class="readmore" href="{{ SITEURL }}/{{ article.url }}">Read more...</a>
</footer>
</article>
{% set article = False %}
{% endfor %}
{%- if articles_page %}
<nav id="pagination">
{%- if articles_page.has_previous() %}
<a id="first_page" href="{{ SITEURL }}/{{ page_name }}.html">&#60;&#60;</a>
<a id="prev_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() if articles_page.previous_page_number() != 1 else "" }}.html">&#60;</a>
{% else %}
<!-- <span id="first_page" class="a inactive">&#60;&#60;</span>
<span id="first_page" class="a inactive">&#60;</span> -->
{% endif -%}
{%- for i in range(1,articles_paginator.num_pages+1) %}
{%- if articles_page.number - 5 < i < articles_page.number + 5 %}
{%- if i == articles_page.number %}
<span class="a active">{{loop.index}}</span>
{% else %}
<a href="{{SITEURL}}/{{ page_name }}{{ ( i if i != 1 else "" ) }}.html">{{loop.index}}</a>
{% endif -%}
{% endif -%}
{% endfor -%}
{%- if articles_page.has_next() %}
<a id="next_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&#62;</a>
<a id="last_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_paginator.num_pages }}.html">&#62;&#62;</a>
{% else %}
<!-- <span id="next_page" class="a inactive">&#62;</span>
<span id="next_page" class="a inactive">&#62;&#62;</span> -->
{% endif -%}
</nav>
{%- endif%}
{% endblock content -%}

View file

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block title %}{{ super() }} — {{ page.url }}{% endblock title %}
{%- block content %}
<h1>{{ page.title }}</h1>
{{ page.content }}
{% endblock content -%}

View file

@ -0,0 +1,6 @@
{% extends "index.html" %}
{% block title %}{{ super() }} — Tag: '{{ tag }}'{% endblock %}
{% block index_title %}Tag: '{{ tag }}'{% endblock %}

View file

@ -0,0 +1,31 @@
{% extends "base.html" %}
{% block headers %}
{{ super() }}
<script type="text/javascript" src="{{ SITEURL }}/theme/js/microTags.js"></script>
<script>
function tag_cloud_init() {
var ul = document.getElementById("tag-cloud");
window.tagCloud = new microTags(ul, {
'min-size': .95,
'max-size': 3.5,
'min-angle': -8,
'max-angle': 8
});
}
if (window.addEventListener) window.addEventListener("load", tag_cloud_init, false);
else if (window.attachEvent) window.attachEvent("onload", tag_cloud_init);
else window.onload = tag_cloud_init;
</script>
{% endblock headers %}
{% block title %}{{ super() }} — Mots-clés{% endblock title %}
{%- block content %}
<!--<h1>Mots-clés</h1>-->
<ul id="tag-cloud">
{% for tag, articles in tags %}
<li data-count="{{ articles|count }}" title="{{ articles|count }} article(s)"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endblock content -%}

62
pelicanconf.py Normal file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'Skia'
SITENAME = u'libskia->display(blog);'
SITEURL = 'http://libskia.so/b'
TIMEZONE = 'Europe/Paris'
DATE_FORMATS = {
'en': ('en_US.utf-8', '%a, %d %b %Y'),
'fr': ('fr_FR.utf-8', '%a %d %b %Y')
}
DEFAULT_LANG = u'en'
MD_EXTENSIONS = ['codehilite', 'extra', 'footnotes']
THEME = 'dev-hyask'
CATEGORIES_SAVE_AS = False
DISPLAY_CATEGORIES_ON_MENU = False
AUTHOR_SAVE_AS = False
DIRECT_TEMPLATES = ('index', 'archives', 'tags')
# Feed generation
FEED_DOMAIN = SITEURL
FEED_ALL_ATOM = 'feed.atom'
FEED_ALL_RSS = 'feed.rss'
# Blogroll
LINKS = (
('Dustri', 'https://dustri.org/'),
('Fr33tux', 'https://fr33tux.org/'),
('Piké', 'https://smagnin.org/'),
('MlleCarnot', 'http://mllecarnot.org/'),
('Vross', 'https://vross.me/'),
('Magne', 'https://ssl.getonmyhor.se/'),
('Nam Nam', 'http://nam.pike.tf/'),
('Krophil', 'http://krophil.fr/'),
('Sli', 'https://klmp200.net/'),
#('Maat', 'http://maatunix.eu/'),
)
# Social widget
#SOCIAL = (('You can add links in your config file', '#'),
#('Another social link', '#'),)
# Pygment options
PYGMENTS_RST_OPTIONS = {'classprefix': 'pgcss', 'linenos': 'table', "style":
"bg:#000000"}
FOOTER_TEXT = '''<a href="http://libskia.so/b/feed.rss">RSS</a><br/>
Powered by <a href="http://pelican.readthedocs.org">Pelican</a><br />
Theme inspired by <a href="https://github.com/getpelican/pelican-themes/tree/master/dev-random2" >dev-random2</a>'''
DEFAULT_PAGINATION = False
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True

20
publishconf.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'pike.tf/skia/b'
RELATIVE_URLS = True
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
DELETE_OUTPUT_DIRECTORY = True