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
var doc = app.activeDocument;
var guides = app.activeDocument.guides;
var w = doc.width;
var h = doc.height;
function MakeGuidesGrid(unitVertical, gutterVertical, unitHorisontal, gutterHorisontal) {
if (unitHorisontal !== 0) {
var j = h / unitHorisontal;
for (var i = 0; i < j; i++) {
guides.add(Direction.HORIZONTAL, i * unitHorisontal);
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
#target "InDesign"
// run script without install to ScriptPanel
(function(){
var script_path = File.openDialog();
try {
script_path ? $.evalFile(script_path) : exit();
}
catch(e){
alert(decodeURI(script_path) + "\n" + e);
// A very basic web server in node.js
// Stolen from: Node.js for Front-End Developers by Garann Means (p. 9-10)
var port = 8000;
var serverUrl = "127.0.0.1";
var http = require("http");
var path = require("path");
var fs = require("fs");
#!/usr/bin/perl
# Convert (and delete) TES files in Wintec WBT-201 to GPX files.
use strict;
use warnings;
use File::Basename;
use Time::Piece;
#!/opt/local/bin/perl
use strict;
$|++;
my $HOME = glob "~";
my $OUTDIR = "$HOME/Pictures/From Memory Card";
my @now = gmtime;
my $stamp = sprintf "%04d-%02d-%02d %02d:%02d:%02d",
$now[5]+1900,
tell application "Safari"
set bounds of front window to {200, 160, 400, 320}
end tell
#!/bin/sh
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
# Get Xcode CLI tools
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex
TOOLS=clitools.dmg
if [ ! -f "$TOOLS" ]; then
if [ "$OSX_VERS" -eq 7 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg
elif [ "$OSX_VERS" -eq 8 ]; then
// hallo Fabian,
// kannst du dir erst vielleicht meinen sketch anschauen, dann kannst du mich besser verstehen, worum ich das meine:
// we need to import the TUIO library
// and declare a TuioProcessing client variable
import TUIO.*;
import java.util.*;
TuioProcessing tuioClient;
/*
* Oscilloscope
* Gives a visual rendering of analog pin 0 in realtime.
*
* This project is part of Accrochages
* See http://accrochages.drone.ws
*
* (c) 2008 Sofian Audry (info@sofianaudry.com)
*
* This program is free software: you can redistribute it and/or modify