Skip to content

Instantly share code, notes, and snippets.

View mipmip's full-sized avatar
🐟

Pim Snel mipmip

🐟
View GitHub Profile
@mipmip
mipmip / MakeDocument.applescript
Created July 11, 2013 12:34
make indesign document
-- tell application "InDesignServer"
tell application "Adobe InDesign CS3"
set myDocument to make document
tell myDocument
tell page 1
set myTextFrame to make text frame
set geometric bounds of myTextFrame to {"6p", "6p", "18p", "18p"}
set contents of myTextFrame to "Hello World!"
end tell
@mipmip
mipmip / imageInfo.rb
Created July 11, 2013 12:33
get indesign image info
require 'rubygems'
require 'appscript'
include Appscript
outputDir= File.join(ENV['HOME'],'Desktop')
pdfpath = File.join(outputDir, "myTempFile.pdf")
filepath = File.join(outputDir, "myTempFile.indd")
imagepath = File.join(outputDir, "Schermafbeelding.png")
imagepath = File.join(outputDir, "Schermafbeelding.png")
imagepath = File.join(outputDir, "test.pdf")
@mipmip
mipmip / imagecenter.rb
Created July 11, 2013 12:32
indesign image center
require 'rubygems'
require 'appscript'
include Appscript
outputDir= File.join(ENV['HOME'],'Desktop')
pdfpath = File.join(outputDir, "myTempFile.pdf")
filepath = File.join(outputDir, "myTempFile.indd")
imagepath = File.join(outputDir, "Schermafbeelding.png")
idApp = app('Adobe InDesign CS4')
@mipmip
mipmip / colors.rb
Created July 11, 2013 12:32
indesign color functions
class CInddexport
require 'rubygems'
require 'appscript'
include Appscript
def initialize(filePath, outputPath, test = false)
@filePath = filePath
@outputPath = outputPath
@idApp = (test == true) ? app('Adobe InDesign CS3') : app('InDesignServer')
end
@mipmip
mipmip / fonts.rb
Created July 11, 2013 12:29
indesign font functions
require 'rubygems'
require 'appscript'
include Appscript
pdfpath = File.expand_path('~')+'/Desktop/myTempFile.pdf'
filepath = File.dirname(__FILE__)+'/snippetsTestDocument.indd'
filepath = MacTypes::FileURL.path(filepath).hfs_path
idApp = app('Adobe InDesign CS4')
@mipmip
mipmip / vertical-align-fix.css
Created July 11, 2013 12:15
vertical-align-fix.css for IE6
/* works for IE 6 en IE 7 */
.lwcomlistitemimgshadow img
{
margin-top:expression(((this.parentNode.parentNode.clientHeight-this.clientHeight)/2) +"px");
}
@mipmip
mipmip / gist:5974744
Created July 11, 2013 11:44
vim: wt_commerce convert to cvs
:%s/\t/,/gc
:%s/\s/,/gc
:%s/;/,/g
@mipmip
mipmip / gist:5586261
Created May 15, 2013 18:44
acties om een extensie toe te voegen aan gitlab:
EXT=extensie_dir
cd $EXT
rm -Rf `find -name ".svn"`
git init
git add *
git commit -a -m 'initial import into github'
git remote add origin git@......../$EXT.git
git push -u origin master
@mipmip
mipmip / read_external_pi_setup.php
Created December 18, 2012 13:41
PHP snippet for TYPO3 to read the setup of an external extension plugin.
<?php
class tx_myclass extends tslib_pibase {
var $conf;
function __construct()
{
$this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_otherplugin_pi3.'];
}
@mipmip
mipmip / damhidefiles.ts
Created November 16, 2012 11:33
TypoScript to hide files in DAM
#hide files!
mod.txdamM1_SHARED.displayExcludeByRegex = \.xml$,^_