- open -a Xquartz
- export DISPLAY=192.168.1.x:0
- xhost + 192.168.1.x
- -e DISPLAY=192.168.1.x:0
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
AFHTTPSessionManager *sessionManager = [AFImageDownloader defaultInstance].sessionManager; | |
sessionManager.securityPolicy.allowInvalidCertificates = YES; | |
sessionManager.securityPolicy.validatesDomainName = NO; |
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
### SHORT WAY | |
DELETE n1 FROM names n1, names n2 WHERE n1.id > n2.id AND n1.name = n2.name | |
### FAST WAY | |
-- Create temporary table | |
CREATE TABLE temp_table LIKE table1; | |
-- Add constraint | |
ALTER TABLE temp_table ADD UNIQUE(category, image_set_id); |
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
# 1. Inside Websites And Domains & > Apache & nginx Settings | |
<Directory "/var/www/vhosts/sfmobile.it/devtat.sfmobile.it"> | |
SetEnvIf Request_URI "frontend_cro/img/email-template" allowed_restricted | |
Order Deny,Allow | |
Deny from all | |
Allow from env=allowed_restricted | |
Satisfy any | |
</Directory> |
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
####### STEP 1 | |
cd local | |
openssl genrsa -out keyfile.key 4096 | |
openssl rsa -in keyfile.key -pubout -out keyfile.pub | |
cp keyfile.pub ../remote/ | |
####### STEP 2 -Encrypt | |
#!/bin/bash | |
file=$1 |
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
UIPopoverPresentationController *popPresenter = ac.popoverPresentationController; | |
popPresenter.sourceView = self.view; | |
popPresenter.sourceRect = CGRectMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds),0,0); | |
popPresenter.permittedArrowDirections = 0; |
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
import android.app.Activity; | |
import android.app.Application; | |
import android.content.ComponentCallbacks2; | |
import android.content.res.Configuration; | |
import android.os.Bundle; | |
import android.util.Log; | |
/** | |
* Created by Fabrizio on 13/11/17. | |
*/ |
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
/usr/local/psa/admin/sbin/mail_auth_view |
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
Upgrade node: | |
1. sudo npm cache clean -f | |
2. sudo npm install -g n | |
3. sudo n stabl |