This file contains 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
<?php | |
// | |
// Bitwise operations can save memory! And looks smart! :) | |
// It is possible use short binary chain as settings registry | |
// Note: PHP 5.4+ knows how to use 0b binary format, older | |
// version can use bindec() function or just use your brain! | |
// | |
// @author Vladimir Belohradsky | |
// |
This file contains 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
// | |
// UIImage-QRCodeGenerator.swift | |
// | |
// Created by Vladimír Bělohradský on 09/07/15. | |
// | |
import QuartzCore | |
import UIKit | |
extension UIImage { |
This file contains 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
<?php | |
/** | |
* Detect overly long words in text and add whitespaces into them to let them wrap | |
* @param string $text Text to be processed | |
* @return string | |
* @author Vladimir Belohradsky | |
*/ | |
function breakLongWords($text) { | |
$maxWordLenght = 30; | |
$words = explode(' ',$text); |