Skip to content

Instantly share code, notes, and snippets.

View srid's full-sized avatar
🌤️
a smoothly flowing moment of clear experiencing

Sridhar Ratnakumar srid

🌤️
a smoothly flowing moment of clear experiencing
View GitHub Profile
4Suite-XML
Amara
archetypes.schemaextender
bicop
borg.localrole
borg.project
borg.supergroup
BrainFreeze
brian
Cheetah
@srid
srid / hakyll.md
Last active September 1, 2015 19:25

Using Hakyll with CircleCi and GitHub Pages

[Posted April 24, 2015; restored here for reference]

Today I switched this site from Jekyll to Hakyll, a Haskell library for generating static sites. It is still hosted in GitHub Pages, which only supports Jekyll. Therefore I had to find a Continuous Delivery service (CD) that will perform and connect the "missing piece," the stage that generates the HTML pages — in between a git push and pushing to GitHub pages. Here is how I did it.

The architecture

  1. For CD, we use CircleCI which hooks into the GitHub repo and monitors for any pushes. When a commit or more is pushed it will start the build per the configuration defined in cirle.yml in the repo. The first step runs cabal install which installs the Hakyll dependencies (including pandoc). This step takes a while — and the CircleCI UI provides excellent feedback on
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\HOME\as\apy\branches\nightly\build\pyhg_branches_release3_1_maint-win32-x86-hgtip31-rrun\python\libs /LIBPATH:C:\HOME\as\apy\branches\nightly\build\pyhg_branches_release3_1_maint-win32-x86-hgtip31-rrun\python\PCbuild /LIBPATH:build\temp.win32-3.1\Release "/LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" "/LIBPATH:C:\Program Files\Microsoft DirectX SDK (August 2009)\lib\x86" advapi32.lib user32.lib ole32.lib oleaut32.lib /EXPORT:PyInit_pywintypes build\temp.win32-3.1\Release\win32\src\PyACL.obj build\temp.win32-3.1\Release\win32\src\PyDEVMODE.obj build\temp.win32-3.1\Release\win32\src\PyHANDLE.obj build\temp.win32-3.1\Release\win32\src\PyIID.obj build\temp.win32-3.1\Release\win32\src\PyLARGE_INTEGER.obj build\temp.win32-3.1\Release\win32\src\PyOVERLAPPED.obj build\temp.win32-3.1\Release\win32\src\PySECURITY_ATTRIBUTES.obj build\temp.win32-3.1\Release\win32\src\PySECURITY_DESCRIPTOR.obj build\temp.wi
@srid
srid / (old) dependency.py
Created January 8, 2010 19:40
dependency.py - r940
# Copyright (c) 2009 ActiveState Software Inc.
# See http://www.activestate.com/activepython/license/ for licensing
# information.
"""
pypm.client.dependency
~~~~~~~~~~~~~~~~~~~~~~
This module contains package dependency related functionality
"""
@srid
srid / (new) dependency.py
Created January 8, 2010 19:42
dependency.py - refactored
# Copyright (c) 2009 ActiveState Software Inc.
# See http://www.activestate.com/activepython/license/ for licensing
# information.
"""
pypm.client.dependency
~~~~~~~~~~~~~~~~~~~~~~
This module contains package dependency related functionality
"""
import sys
import os
from os.path import (abspath, basename, exists, isfile, isdir,
pardir, join, dirname, relpath, realpath)
import tarfile
import zipfile
from contextlib import closing
from pypm.common import console
make: [build_chm] create TOC file 'build\py2_5_4-win64-x64-apy25\docs\chm\ActivePython25.hhc'
make: [build_chm] create index file 'build\py2_5_4-win64-x64-apy25\docs\chm\ActivePython25.hhk'
make: [build_chm] running 'python C:\HOME\as\apy\branches\2.5.5\build\py2_5_4-win64-x64-apy25\python\Doc\tools\prechm.py -v 2.5 -c
-p ActivePython25' in 'build\py2_5_4-win64-x64-apy25\docs\chm\python'
Building Index...
Main page - None
Global Module Index - None
What's New - None
Tutorial - None
Library Reference - genindex.html
@srid
srid / pep370-fix.patch
Created January 27, 2010 02:39
Make hg.bat of mercurial work in ActivePython's PyPM. See: http://stackoverflow.com/questions/2143897
A fix for http://mercurial.selenic.com/bts/issue1939
Index: mercurial-1.4.2/contrib/win32/hg.bat
===================================================================
--- mercurial-1.4.2.orig/contrib/win32/hg.bat 2010-01-26 17:47:24.906664318 -0800
+++ mercurial-1.4.2/contrib/win32/hg.bat 2010-01-26 18:02:13.546670215 -0800
@@ -4,9 +4,10 @@
setlocal
set HG=%~f0
ActivePython 2.6.4.10 (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Jan 22 2010, 16:40:49)
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.asctime((2010, 1, -1, 18, 0, 0, 0, 0, -1))
'Mon Jan -1 18:00:00 2010'
>>>
$ pip install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.18/pychecker-0.8.18.tar.gz/download