Skip to content

Instantly share code, notes, and snippets.

View mihailsalari's full-sized avatar
🎯
Focusing

Mihail Salari mihailsalari

🎯
Focusing
View GitHub Profile
@mihailsalari
mihailsalari / mailserver.md
Created February 8, 2024 20:56 — forked from opentaq/mailserver.md
Mailserver Installation

Fail2Ban

sudo install fail2ban

UFW

sudo install ufw

UFW Settings

sudu ufw default deny incomoing

sudo ufw default allow outgoins

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@mihailsalari
mihailsalari / Activate Office 2019 for macOS VoL.md
Created May 4, 2022 08:03 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@mihailsalari
mihailsalari / CertificatePinningURLSessionDelegate.swift
Created May 3, 2022 09:56 — forked from daniel-rueda/CertificatePinningURLSessionDelegate.swift
Certificate and Public Key Pinning for URLSession using Swift
// Based on https://code.tutsplus.com/articles/securing-communications-on-ios--cms-28529
import Foundation
import Security
struct Certificate {
let certificate: SecCertificate
let data: Data
}
@mihailsalari
mihailsalari / Tabbar.Swift
Created June 11, 2020 19:14 — forked from calt/Tabbar.Swift
UITabBar with custom height in Swift
extension UITabBar {
override open func sizeThatFits(size: CGSize) -> CGSize {
super.sizeThatFits(size)
var sizeThatFits = super.sizeThatFits(size)
sizeThatFits.height = 71
return sizeThatFits
}
}
@mihailsalari
mihailsalari / PDFHelpers.swift
Created June 2, 2020 17:52 — forked from benbahrenburg/PDFHelpers.swift
Removing PDF password using Swift
//
// PDF.swift
//
// Created by Ben Bahrenburg on 1/1/17.
// Copyright © 2017 bencoding.. All rights reserved.
//
import UIKit
open class PDFHelpers {
#import "TSTextToSpeechUtils.h"
@interface TSTextToSpeechUtils ()
@property (strong, nonatomic) AVSpeechSynthesizer *synthesizer;
@property (strong, nonatomic) AVSpeechUtterance *lastPlayingUtterance;
@property (strong, nonatomic) AVAudioSession *audioSession;
@end
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@interface TSTextToSpeechUtils : NSObject<AVSpeechSynthesizerDelegate>
- (void)synthesizeSpeechForText:(NSString *)text;
@end
@objc
class TextToSpeechUtils: NSObject, AVSpeechSynthesizerDelegate {
let synthesizer = AVSpeechSynthesizer()
let audioSession = AVAudioSession.sharedInstance()
let defaultLanguage = "en-US"
var lastPlayingUtterance: AVSpeechUtterance?
public func synthesizeSpeech(forText text: String) {
import UIKit
class ResponsiveView: UIView {
override var canBecomeFirstResponder: Bool {
return true
}
}
class ViewController: UIViewController {