This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************** | |
* 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 <[email protected]> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Like Uncle Ben saz: "With great power comes great responsability!" | |
app.documents.everyItem().close(SaveOptions.NO); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#targetengine "session01" | |
var myValue = 0; // new value | |
alert(myValue); // result is 0 | |
myValue++; // increment by 1 |
OlderNewer