Skip to content

Instantly share code, notes, and snippets.

View aleecan's full-sized avatar
🏠
Working from home

Ali Can aleecan

🏠
Working from home
View GitHub Profile
@aleecan
aleecan / nginx.conf
Created February 17, 2022 08:42 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@aleecan
aleecan / EncodeBased64Binary.java
Created May 29, 2019 11:27 — forked from utsengar/EncodeBased64Binary.java
Encode a file to base64 binary in Java
import org.apache.commons.codec.binary.Base64;
private String encodeFileToBase64Binary(String fileName)
throws IOException {
File file = new File(fileName);
byte[] bytes = loadFile(file);
byte[] encoded = Base64.encodeBase64(bytes);
String encodedString = new String(encoded);
@aleecan
aleecan / Map_.idea_Map.iml
Created July 17, 2017 08:56
OpenStreetMap Application
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
function isLetters(un){
var a=un;
var count=0;
for (var i = a.length - 1; i >= 0; i--) {
if ((a.charCodeAt(i)>64 && a.charCodeAt(i)<91) || (a.charCodeAt(i)>96 && a.charCodeAt(i)<123) ) {
count++;
};
};
if (count!=a.length) {
return false;