Skip to content

Instantly share code, notes, and snippets.

View eip's full-sized avatar

Ed Popsuev eip

  • Ukraine
View GitHub Profile
@eip
eip / JSON To CLR.applescript.js
Created July 27, 2016 20:08
Convert JSON to Apple Color List (.CLR)
var app;
var clrFilePath;
var colorCnt = 0;
var colorList;
var jsonFilePath;
var nsColorList;
var paletteName;
function hex2rgba(color) {
function ch(pos) {
@eip
eip / CLR To JSON.applescript.js
Last active December 15, 2024 04:02
Convert Apple Color List (.CLR) to JSON
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);
@eip
eip / Default (OSX).sublime-keymap
Last active June 9, 2018 10:07
Sublime Text 3: keyboard shortcut for syntax (scope) specific beautify command
[{
"keys": ["super+shift+h"],
"command": "eip_beautify",
"args": {"command": "cd \"{dir}\" && js-beautify --js --replace \"{file}\""},
"context": [{"key": "selector", "operand": "source.js", "operator": "equal"}]
}, {
"keys": ["super+shift+h"],
"command": "eip_beautify",
"args": {"command": "cd \"{dir}\" && js-beautify --css --replace \"{file}\" && csscomb \"{file}\""},
"context": [{"key": "selector", "operand": "source.css", "operator": "equal"
@eip
eip / md2html.sh
Last active June 15, 2016 13:31
Use GitHub Markdown API with curl
curl --data-binary @README.md --header "Content-Type:text/plain" https://api.github.com/markdown/raw -o index.html