Skip to content

Instantly share code, notes, and snippets.

View sojuzpl's full-sized avatar
:octocat:
Learning and working

Zbyszek sojuzpl

:octocat:
Learning and working
View GitHub Profile
@sojuzpl
sojuzpl / ccdl.command
Created August 16, 2021 13:07
Adobe Offline Package Generator v0.1.3 (macOS only).
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@sojuzpl
sojuzpl / MultiExporter.jsx
Created July 24, 2021 14:11 — forked from TomByrne/MultiExporter.jsx
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@sojuzpl
sojuzpl / max_width_email.html
Created October 12, 2020 08:44 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@sojuzpl
sojuzpl / hexToUIColor.swift
Last active October 14, 2018 15:36
Convert hexadecimal color to UIColor format in Swift 4.2
import Foundation
import UIKit
func hexToColor (hexColor: String) -> Any? {
let hexColorUppercased: String = hexColor
.uppercased()
.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
let scanner = Scanner(string: hexColorUppercased)
let hexCharacters = "0123456789ABCDEF#"