This file contains hidden or 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
// Connect to the database | |
db = db.getSiblingDB("cdtserver"); | |
var ignore = ["collection-metadata", "Roulette", "fs.", "test"]; | |
var collectionNames = db.getCollectionNames(); | |
var descriptions = {}; | |
if (collectionNames.includes("collection-metadata")) { | |
db.getCollection("collection-metadata") | |
.find() |
This file contains hidden or 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 idx_shift = 0 | |
try { | |
activeDocument.backgroundLayer | |
} catch (e) { | |
idx_shift = 1 | |
} | |
var list = get_selected_layers() | |
if (list) { | |
var orig_idx = list.slice() | |
function cmp(a, b) { |
This file contains hidden or 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
// ==UserScript== | |
// @name GitHub Ignore Whitespace | |
// @namespace http://spicewood.tech/ | |
// @version 1.1 | |
// @description Add URL parameter to ignore whitespace in GitHub pull request reviews | |
// @author Nimai C. Malle | |
// @match https://github.com/*/*/pull/* | |
// @grant none | |
// @downloadURL https://gist.githubusercontent.com/NimaiMalle/9f1ddac7784632ba1b9b72f753dbcdf4/raw/github_ignore_whitespace.js?v=1.1 | |
// ==/UserScript== |
This file contains hidden or 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
#target Photoshop | |
function makeLayerMask(maskType) { | |
if( maskType == undefined) maskType = 'RvlS' ; //from selection | |
//requires a selection 'RvlS' complete mask 'RvlA' otherThanSelection 'HdSl' | |
var desc140 = new ActionDescriptor(); | |
desc140.putClass( charIDToTypeID('Nw '), charIDToTypeID('Chnl') ); | |
var ref51 = new ActionReference(); | |
ref51.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') ); | |
desc140.putReference( charIDToTypeID('At '), ref51 ); | |
desc140.putEnumerated( charIDToTypeID('Usng'), charIDToTypeID('UsrM'), charIDToTypeID(maskType) ); |
This file contains hidden or 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
jpgSaveOptions = new JPEGSaveOptions(); | |
jpgSaveOptions.embedColorProfile = true; | |
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; | |
jpgSaveOptions.matte = MatteType.NONE; | |
jpgSaveOptions.quality = 11; | |
var Name = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, ''); | |
var Path = decodeURI(activeDocument.path); | |
var saveFile = File(Path + "/" + Name + ".jpg") | |
activeDocument.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE); |
This file contains hidden or 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
// this script is a variation of the script addTimeStamp.js that is installed with PH7 | |
if ( documents.length > 0 ) | |
{ | |
var originalDialogMode = app.displayDialogs; | |
app.displayDialogs = DialogModes.ERROR; | |
var originalRulerUnits = preferences.rulerUnits; | |
preferences.rulerUnits = Units.PIXELS; | |
try |