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
on basename(thePath) -- Requires POSIX path | |
if thePath ends with "/" then | |
set nameIndex to -2 | |
else | |
set nameIndex to -1 | |
end if | |
set ASTID to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to "/" | |
set thePath to text item nameIndex of thePath | |
set AppleScript's text item delimiters to ASTID |
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
<?php | |
function log($msg) | |
{ | |
//using the date() function | |
$time = date("F jS Y, h:iA"); | |
//$remote_addr is PHP variable to get ip address | |
$ip = $REMOTE_ADDR; | |
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
map <silent> ,w :silent w<CR> :!pandoc '%' -o '%.docx'<CR><CR> |
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
" Functions for fast single file vim/fugitive workflow | |
" | |
" Add this in your .vimrc and use it like this: | |
" Just commit current file with message | |
" :GitCommitWithMessage 'fix typo' | |
" Commit current file with message and push afterwards | |
" :GitCommitPushWithMessage 'fix typo' | |
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
{{ name }} | |
{{{ name }}} |
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
sqlite3 refx3development.sqlite3 | |
sqlite3> .table | |
sqlite3> DELETE FROM jobs; | |
sqlitw3> .quit |
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
// Write files: | |
foreach($writeFiles as | |
$theFile => $fileData) { | |
t3lib_div::writeFile($extDirPath.$theFile,$fileData['content']); | |
if | |
(!@is_file($extDirPath.$theFile)) { | |
$content .= | |
sprintf($GLOBALS['LANG']->getLL('ext_import_file_not_created'), | |
$extDirPath . |
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
require 'osx/cocoa' | |
require 'rubygems' | |
require 'appscript' | |
require 'activesupport' | |
require 'base64' | |
require 'fileutils' | |
class InDesignTrospection | |
include Appscript |
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
require 'rubygems' | |
require 'appscript' | |
include Appscript | |
idApp = app('Adobe InDesign CS4') | |
myDoc= idApp.make(:new => :document) | |
p idApp.layout_windows[1].transform_reference_point.set(:to=> :top_left_anchor) |
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
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.psd") |