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
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 |
That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.