Skip to content

Instantly share code, notes, and snippets.

View xthesaintx's full-sized avatar

Stephen Garrett xthesaintx

View GitHub Profile
anonymous
anonymous / gist:7677d654c1357ee6d3ae1a1dc246c3b6
Created November 30, 2017 21:34
Export all items in INDESIGN file as individual PNG files
// Set resolution options
var rp = [72,150,300];
// Set EXPORT presets
app.pngExportPreferences.exportResolution = 72;
app.pngExportPreferences.antiAlias = true;
app.pngExportPreferences.pngQuality = PNGQualityEnum.MAXIMUM;
app.pngExportPreferences.pngColorSpace = PNGColorSpaceEnum.RGB;
app.pngExportPreferences.pngExportRange = PNGExportRangeEnum.EXPORT_RANGE;
@iNaD
iNaD / request_no_curl.php
Last active February 29, 2024 09:37
Sending a GET/POST Request via PHP without CURL (fopen needs to be enabled)
<?php
$url = 'http://server.com/path';
$data = array('key1' => 'value1', 'key2' => 'value2');
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),