Quando o nginx estiver com erro de permissão para acessar localhost, rode este comando:
/usr/sbin/setsebool httpd_can_network_connect true
Quando o nginx estiver com erro de permissão para acessar localhost, rode este comando:
/usr/sbin/setsebool httpd_can_network_connect true
{ | |
"workbench.colorTheme": "Hop Light", | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.fontAliasing": "antialiased", | |
"window.zoomLevel": 1.2, | |
// Pre VS Code 1.15 | |
"emmet.syntaxProfiles": { | |
"javascript": "jsx" | |
}, |
// add this code before all: | |
process.on('uncaughtException', function(err) { | |
console.error(err.stack); | |
console.log('UNCAUGHT_EXCEPTION: ' + err); | |
}); |
func getAppVersion() -> String? { | |
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String { | |
return version | |
} | |
return nil | |
} |
private func createTempFile(_ file: Data) throws -> URL { | |
let dir = NSTemporaryDirectory() | |
let fileName = NSUUID().uuidString | |
let url = NSURL.fileURL(withPathComponents: [dir, fileName])! | |
try file.write(to: url) | |
return url | |
} |
extension MyViewController: UITextFieldDelegate { | |
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { | |
guard let text = textField.text else { return true } | |
let newLength = text.characters.count + string.characters.count - range.length | |
return newLength <= 30 // replace 30 for your max length value | |
} | |
} |
.card { | |
width: 230.551181102px; | |
height: 325.039370079px; | |
border: 5px solid #8B7355; | |
overflow: hidden; | |
float: left; | |
position: relative; | |
margin: 10px 10px; | |
background-image: url(img/parchment-bg.jpg); |
import Foundation | |
class NotificationService { | |
static private var _instance: NotificationService! = nil | |
static var sharedInstance: NotificationService { | |
get { | |
if NotificationService._instance == nil { | |
NotificationService._instance = NotificationService() |