Skip to content

Instantly share code, notes, and snippets.

Carlos Araya caraya

Block or report user

Report or block caraya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caraya
caraya / my_looper-no_comments.php
Created Jun 21, 2011 — forked from alderete/my_looper-no_comments.php
A starter template for the Custom Loop API in the Thesis theme for WordPress.
View my_looper-no_comments.php
<?php
// Source and explanation of this file:
// http://aldosoft.com/blog/2011/01/thesis-custom-loop-template/
class my_looper extends thesis_custom_loop {
function home() {
thesis_loop::home();
}
@caraya
caraya / custom.css
Created Mar 25, 2012 — forked from mattonomics/custom.css
Thesis Skin Starter Template - Advanced
View custom.css
/*---:[ body ]:---*/
body { background: #000; }
/*---:[ menu ]:---*/
.menu { list-style: none; }
.menu li { float: left; }
.menu li a { text-decoration: none; display: block; }
/*---:[ post image fix from @kristarella ]:---*/
.post_image { max-width: 100%; height: auto; }
View README.txt
This code is released under the following license
Copyright (c) 2012 Carlos Araya
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
View validate_test.rb
#!/usr/bin/env ruby -w
require_relative '../lib/ctools/validator.rb'
class Tool_test
puts $LOAD_PATH
@html = File.new('/Users/carlos/experiment/code/conversion_tools/test/index.html').read
Ctools.Validator.validate_text(@html)
end
@caraya
caraya / opf.py
Last active Jan 24, 2018
Beginnings of a Python script to create basic opf content packages
View opf.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Requires the following libraries
# BeautifulSoup4
# Code based on: http://pydanny.com/generating-ncx-files-with-python.html
# Use os.path.exists() to test if a directory exists
# Use glob.glob('directory/path/*) to get the listing of a directory
class epub:
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
View concat.js
module.exports = {
options: {
separator: ';'
},
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
}
View Sync_Async_loading_handlebars.js
/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
View ebook-package.json
{
"spine": [
{
"idref": "cover"
},
{
"idref": "titlepage"
},
{
"idref": "about"
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="viewport"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"></script>
<script src="//threejs.org/examples/js/controls/OrbitControls.js"></script>
View iBooks-popups.md

The only requirements for popup footnotes in iBooks are:

  • Ebook has to be an EPUB3
  • epub:type "noteref" and "footnote"

So you can link to a totally separate document, as you normally would for endnotes, but include the attributes so the link behaves differently in iBooks, instead triggering the popup.

Original reference link would look something like this (in a file called ch001.html):

1

You can’t perform that action at this time.