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
<meta name="theme-color" content="#8844ee"> | |
<meta name="msapplication-navbutton-color" content="#8844ee"> |
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
#! /bin/bash | |
# | |
cd $(dirname "$0") | |
base=1024x1024.png | |
if [ -z $base ] | |
then | |
echo No argument given | |
else |
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
func colorWithHexString (hex:String) -> UIColor { | |
var cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString | |
if (cString.hasPrefix("#")) { | |
cString = (cString as NSString).substringFromIndex(1) | |
} | |
if (cString.characters.count != 6) { | |
return UIColor.grayColor() | |
} |
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
import UIKit | |
extension String { | |
subscript (r: CountableClosedRange<Int>) -> String { | |
get { | |
let startIndex = self.index(self.startIndex, offsetBy: r.lowerBound) | |
let endIndex = self.index(startIndex, offsetBy: r.upperBound - r.lowerBound) | |
return self[startIndex...endIndex] | |
} |
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
#! /bin/bash | |
# | |
cd $(dirname "$0") | |
base=1024x1024.png | |
if [ -z $base ] | |
then | |
echo No argument given | |
else |
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
// | |
extension UIImageView { | |
func loadFromUrl(url: String?) { | |
if let url = url { | |
self.sd_setImageWithURL(NSURL(string: "\(url)")) | |
} | |
} | |
} |
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
.state('example-detail', { | |
parent: 'entity', | |
url: '/example/{id}', | |
data: { | |
authorities: ['ROLE_USER'], | |
pageTitle: 'Example.example.detail.title' | |
}, | |
views: { | |
'content@': { | |
templateUrl: 'app/entities/example/example-detail.html', |
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
Principal.identity().then(function (user) { | |
}); |
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
extension Date { | |
/// Returns a Date with the specified days added to the one it is called with | |
func add(years: Int = 0, months: Int = 0, days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0) -> Date { | |
var targetDay: Date | |
targetDay = Calendar.current.date(byAdding: .year, value: years, to: self)! | |
targetDay = Calendar.current.date(byAdding: .month, value: months, to: targetDay)! | |
targetDay = Calendar.current.date(byAdding: .day, value: days, to: targetDay)! | |
targetDay = Calendar.current.date(byAdding: .hour, value: hours, to: targetDay)! | |
targetDay = Calendar.current.date(byAdding: .minute, value: minutes, to: targetDay)! |
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
xattr -cr App.app |
OlderNewer