Since macOS High Sierra sips --addIcon
is no longer supported.
An easier way to add and image to a file/folder is to use fileicon
npm package.
The new syntax is:
fileicon set foo img.png
-- AppleScript -- | |
-- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
-- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
-- This method is as good as its JXA counterpart. | |
-- Google Chrome | |
tell application "Google Chrome" to return title of active tab of front window | |
tell application "Google Chrome" to return URL of active tab of front window | |
-- Google Chrome Canary |
#!/bin/bash | |
# usage: set_icon.sh <some.icns or image_file> <folder or file path> | |
# Based on: http://www.amnoid.de/icns/makeicns.html | |
icon="$1" | |
target="$2" | |
if [[ -d "${target}" ]]; then | |
target_icon="${target}"/$'Icon\r' | |
else | |
target_icon="${target}" |
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
ObjC.import('Cocoa') | |
App = Application.currentApplication() | |
App.includeStandardAdditions = true | |
const RESOURCE = $.NSBundle.mainBundle.resourcePath.js | |
const HOST = 'localhost' | |
const PORT = 8080 | |
const ADDR = `${HOST}:${PORT}` | |
const DIR = `${RESOURCE}/public_html/` |
Since macOS High Sierra sips --addIcon
is no longer supported.
An easier way to add and image to a file/folder is to use fileicon
npm package.
The new syntax is:
fileicon set foo img.png
var app; | |
var clrFilePath; | |
var colorCnt = 0; | |
var colorList; | |
var jsonFilePath; | |
var nsColorList; | |
var paletteName; | |
function hex2rgba(color) { | |
function ch(pos) { |
var app; | |
var clrFilePath; | |
var colorList = {}; | |
var jsonFilePath; | |
var nsColorList; | |
var nsStringColorList; | |
var paletteName; | |
function c2h(colorValue) { | |
return ('0' + Math.round(colorValue * 255).toString(16)).slice(-2); |
# TextMate tutorial: http://manual.macromates.com/en/language_grammars | |
# Regex to convert keys to unquoted: '(include|match|captures|begin|end|beginCaptures|endCaptures|name|patterns|0|1|2|3|4|5|6|7|8|9|comment|fileTypes|scopeName|repository|contentName|firstLineMatch|foldingStartMarker|foldingStopMarker)': | |
scopeName: 'source.<scope>' # <scope> should be a short, unique indicator for the language ("js", "php", "c", etc.) | |
name: '<name>' # The title that will show up in grammar selection and on your status bar. | |
fileTypes: [ # An array of file extensions. | |
'txt' | |
'exif' | |
] |
// | |
// JXAReader.js | |
// | |
// Created by uchcode on 2016/05/28. | |
// Copyright © 2016 uchcode. All rights reserved. | |
// | |
function read(fname) { | |
function LibPath(fname, resourcePath) { | |
return $(resourcePath + '/Script Libraries/' + fname).stringByStandardizingPath.js |