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 is jsut the "meat" of the solution | |
const PEPPERFLASH_PLUGIN = 'resources/pepperFlash/mac/PepperFlashPlayer.plugin' | |
let pluginName | |
let pluginDir = __dirname | |
switch (process.platform) { | |
case 'win32': | |
switch (process.arch) { | |
case "x64": | |
pluginName = PEPPERFLASH_PLUGIN_WIN64 | |
break; |
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
{ | |
"asarUnpack" : ["resources/pepperFlash/mac"] | |
} |
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 is jsut the "meat" of the solution | |
const PEPPERFLASH_PLUGIN = __dirname.indexOf("asar") >=0 ? '../resources/pepperFlash/mac/PepperFlashPlayer.plugin' : 'resources/pepperFlash/mac/PepperFlashPlayer.plugin' | |
let pluginName | |
switch (process.platform) { | |
case 'win32': | |
switch (process.arch) { | |
case "x64": | |
pluginName = PEPPERFLASH_PLUGIN_WIN64 | |
break; | |
default: |
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
let toBGN = (value) => { | |
let under10 = (value, currency = false) => { | |
let index = Math.floor(value) | |
if(index > 10) { | |
index = 10; | |
} | |
let resultArray = | |
[ | |
"нула", "един", "два", "три", "четири", "пет", "шест", |
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
#!/bin/bash | |
FILES=*.jpg | |
mkdir out | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
# take action on each file. $f store current file name | |
convert $f -resize 2000x2000\> out/$f | |
done |
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
REM add watermark to all JPG images in the same folder | |
REM resize all JPG images in the same folder | |
REM put the result in different folder | |
SET IMAGE_MAGICK="C:\Program Files\ImageMagick-7.0.10-Q16\magick.exe" | |
SET SIZE=700x700 | |
mkdir watermark | |
mkdir resize | |
for /F "usebackq delims=" %%i in (`dir /a:-d /b %foldername%\*.jpg`) do %IMAGE_MAGICK% %%i ( watermark.png ) -gravity center -composite watermark\%%i |
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
//custom class | |
//Don't forget to assigne that custom class to your UIButton views in the storyboard file | |
class BadgeButton: UIButton, BadgeContainer { | |
var badgeTimer: Timer? | |
var badgeView: UIView? | |
var badgeLabel: UILabel? | |
} | |
//here is how to use it in simple view controller | |
class MyViewController: UIViewController { |
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
// Created by © 2020 SwiftEverywhere. Can be used free of charge. | |
import UIKit | |
//protocol | |
protocol BadgeContainer: class { | |
var badgeView: UIView? { get set } | |
var badgeLabel: UILabel? { get set } | |
func showBadge(blink: Bool, text: String?) | |
func hideBadge() | |
} | |
//default protocol implementation |
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
// Created by © 2020 SwiftEverywhere. Can be used free of charge. | |
import UIKit | |
//protocol | |
protocol BadgeContainer: class { | |
var timer: Timer? { get set } | |
var badgeView: UIView? { get set } | |
var label: UILabel? { get set } | |
func showBadge(blink: Bool, text: String?) | |
func hideBadge() | |
} |
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
// | |
// UIDevice+Extensions.swift | |
// tenbet | |
// | |
// Created by Emil Atanasov on 28.10.19. | |
// Copyright © 2019. All rights reserved. | |
// | |
//based on https://stackoverflow.com/questions/46192280/detect-if-the-device-is-iphone-x/47067296 |