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
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git |
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
| static public String encrypt(String unencryptedString) { | |
| String UNICODE_FORMAT = "UTF8" | |
| String DESEDE_ENCRYPTION_SCHEME = "DESede" | |
| String myEncryptionKey = "Provide your encryption key" | |
| String myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME | |
| byte[] arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT) | |
| KeySpec ks = new DESedeKeySpec(arrayBytes) | |
| SecretKeyFactory skf = SecretKeyFactory.getInstance(myEncryptionScheme) | |
| Cipher cipher = Cipher.getInstance(myEncryptionScheme) |
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
| static public String decrypt(String encryptedString) { | |
| String UNICODE_FORMAT = "UTF8" | |
| String DESEDE_ENCRYPTION_SCHEME = "DESede" | |
| String myEncryptionKey = "Provide the same key used for encryption" | |
| String myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME | |
| byte[] arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT) | |
| KeySpec ks = new DESedeKeySpec(arrayBytes) | |
| SecretKeyFactory skf = SecretKeyFactory.getInstance(myEncryptionScheme) | |
| Cipher cipher = Cipher.getInstance(myEncryptionScheme) |
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
| javax.net.ssl.SSLHandshakeException: | |
| sun.security.validator.ValidatorException: PKIX path building failed: | |
| sun.security.provider.certpath.SunCertPathBuilderException: | |
| unable to find valid certification path to requested target | |
| Caused by: sun.security.validator.ValidatorException: | |
| PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: | |
| unable to find valid certification path to requested target | |
| Caused by: sun.security.provider.certpath.SunCertPathBuilderException: |
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
| nexthoughts@NexThoughts:~/Desktop$ java InstallCert services.krediidiinfo.ee | |
| Loading KeyStore /usr/lib/jvm/java-7-oracle/jre/lib/security/jssecacerts... | |
| Opening connection to services.krediidiinfo.ee:443... | |
| Starting SSL handshake... | |
| javax.net.ssl.SSLException: java.lang.UnsupportedOperationException | |
| at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) | |
| at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1884) | |
| at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1842) | |
| at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1825) | |
| at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1346) |
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
| <script type="text/javascript"> | |
| window.history.forward(); | |
| function noBack() { window.history.forward(); } | |
| </script> | |
| </head> | |
| <body onload="noBack();" | |
| onpageshow="if (event.persisted) noBack();" onunload=""> |
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
| <script> | |
| var validNavigation = false; | |
| function wireUpEvents() { | |
| var dont_confirm_leave = 0; | |
| var leave_message = "You sure you want to leave ?"; | |
| function goodbye(e) { | |
| if (!validNavigation) { | |
| if (dont_confirm_leave !== 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
| if (typeof jQuery !== 'undefined') { | |
| (function($) { | |
| $('#spinner').ajaxStart(function() { | |
| $(this).fadeIn(); | |
| }).ajaxStop(function() { | |
| $(this).fadeOut(); | |
| }); | |
| })(jQuery); | |
| } |
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
| Properties props = System.getProperties(); | |
| props.setProperty("mail.store.protocol", "imaps"); | |
| try { | |
| Session session = Session.getInstance(props, null); | |
| Store store = session.getStore("imaps"); | |
| final String username = "" | |
| final String password = "" | |
| store.connect("imap.gmail.com", 993, username, password); | |
| Folder inbox = store.getFolder("INBOX"); | |
| inbox.open(Folder.READ_ONLY); |
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
| Properties props = new Properties(); | |
| props.put("mail.smtp.host", "smtp.gmail.com"); | |
| props.put("mail.smtp.socketFactory.port", "465"); | |
| props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); | |
| props.put("mail.smtp.auth", "true"); | |
| props.put("mail.smtp.port", "465"); | |
| final String username = "" | |
| final String password = "" | |
| Session session = Session.getDefaultInstance(props, | |
| new javax.mail.Authenticator() { |