Skip to content

Instantly share code, notes, and snippets.

View ff6347's full-sized avatar
🤖
updating status…

Fabian Morón Zirfas ff6347

🤖
updating status…
View GitHub Profile
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
# Changes from the original gist: http://gist.github.com/268428
# 1. Handles titles containing special characters. Those have to be YAML escaped
# 2. Use the original permalinks in wordpress.
@ff6347
ff6347 / generate_archives.rb
Created July 18, 2011 14:45 — forked from stympy/generate_archives.rb
Archive generator plugin for jekyll
# Jekyll archive page generator with pagination.
#
# Based on the category generator from
# http://recursive-design.com/projects/jekyll-plugins/,
# which is copyright (c) 2010 Dave Perrett,
# http://recursive-design.com/ and is licensed under the MIT
# license (http://www.opensource.org/licenses/mit-license.php), and
# on the pagination code from Jekyll itself.
#
# This code is copyright (c) 2011 Benjamin Curtis, and is licensed
@ff6347
ff6347 / objfromai.jsx
Created March 19, 2012 08:41
creating obj files from adobe illustrator for TRapcode Form !NOT WORKING RIGHT
main();
function main(){
var list = new Array();
var doc = app.activeDocument;
var str = "";
var coords = new Array();
var ab = doc.artboards[0];
// ab.rulerOrigin = [0 , 0];
@ff6347
ff6347 / osm2geo.js
Created April 15, 2012 17:04 — forked from tecoholic/osm2geo.js
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*
@ff6347
ff6347 / anchorsToObj.jsx creating obj files from adobe illustrator for Trapcode Form (FIXED)
main();
function main(){
var list = new Array();
var doc = app.activeDocument;
var str = "";
var coords = new Array();
var ab = doc.artboards[0];
// ab.rulerOrigin = [0 , 0];
@ff6347
ff6347 / image_matrix.jsx
Created May 10, 2012 07:23
Create a image matrix from files in InDesign
// image_matrix.jsx
// creates a matrix of images ;)
// Copyright (c) 2012
// Fabian "fabiantheblind" Morón Zirfas
// 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
@ff6347
ff6347 / createDocuments.jsx
Created May 10, 2012 08:02
builds 23 InDesign Documents
// createDocuments.jsx
var counter = 0;
var numberOfDocuments = 22;
while(counter <= numberOfDocuments){
app.documents.add({
documentPreferences:{
pageWidth:100,pageHeight:100
}
});
var tf = app.activeDocument.pages.item(0).textFrames.add({
@ff6347
ff6347 / greatPower-I.jsx
Created May 10, 2012 08:03
close all open InDesign documents
// Like Uncle Ben saz: "With great power comes great responsability!"
app.documents.everyItem().close(SaveOptions.NO);
@ff6347
ff6347 / try_char_demo.jsx
Created May 10, 2012 14:59
Test if a character is in the font
var tf = app.activeDocument.pages.item(0).textFrames.item(0);
for(var i = 0; i < tf.characters.length;i++){
var theChar = tf.characters.item(i);
try_char (theChar);
};
// original function by Peter Kahrel
// http://www.kahrel.plus.com/indesign/compose_cs3.jsx
// edited by fabiantheblind
function try_char (theChar){
@ff6347
ff6347 / targetengine_example_script1.jsx
Last active October 4, 2015 14:38
What is a targetengine in extendscript?
#targetengine "session01"
var myValue = 0; // new value
alert(myValue); // result is 0
myValue++; // increment by 1