Skip to content

Instantly share code, notes, and snippets.

View muhammedfurkan's full-sized avatar
🙃

M.Furkan muhammedfurkan

🙃
View GitHub Profile
@muhammedfurkan
muhammedfurkan / mime.types
Created September 11, 2023 16:51 — forked from marlosirapuan/mime.types
NGINX Config - Content-Security-Policy (Google, Google Fonts, Facebook, Zendesk, MaxCDN-FontAwesome, CKEditor), Cache, Mime-Types, Puma
# /etc/nginx/mime.types
types {
font/ttf ttf;
font/opentype otf;
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@muhammedfurkan
muhammedfurkan / encode_decode_hmac.js
Created May 4, 2023 13:59 — forked from fictorial/encode_decode_hmac.js
encode / decode with hmac for node.js
// note: encoded data is NOT encrypted
const crypto = require('crypto');
const secret = '20BBEBB8-DCC1-4544-AD32-7F3973CCED7A';
function createDigest(encodedData, format) {
return crypto
.createHmac('sha256', secret)
.update(encodedData)
.digest(format);
@muhammedfurkan
muhammedfurkan / ExportCSV.js
Created February 3, 2023 11:43 — forked from bbachi/ExportCSV.js
react excel functionality
import React from 'react'
import Button from 'react-bootstrap/Button';
import * as FileSaver from 'file-saver';
import * as XLSX from 'xlsx';
export const ExportCSV = ({csvData, fileName}) => {
const fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
const fileExtension = '.xlsx';
@muhammedfurkan
muhammedfurkan / AES-CBC-PKCS5PADDING.md
Created February 1, 2023 06:52 — forked from kcak11/0000.md
AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

@muhammedfurkan
muhammedfurkan / AUTO_DEPLOY.md
Created November 3, 2022 07:26 — forked from zihadmahiuddin/AUTO_DEPLOY.md
GitHub Auto Deploy for NodeJS apps using Webhooks
@muhammedfurkan
muhammedfurkan / example.com
Created September 26, 2022 06:39
NGINX installation with Let's Encrypt
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name example.com;
include /etc/nginx/mime.types;
}
server {
if ($host = example.com) {
@muhammedfurkan
muhammedfurkan / js-turkish-to-english.js
Created June 17, 2022 08:09 — forked from enginkartal/js-turkish-to-english.js
Javascript Turkish character to english characters change
String.prototype.turkishtoEnglish = function () {
return this.replace('Ğ','g')
.replace('Ü','u')
.replace('Ş','s')
.replace('I','i')
.replace('İ','i')
.replace('Ö','o')
.replace('Ç','c')
.replace('ğ','g')
.replace('ü','u')
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
if (sys.version_info < (3, 0)):
# Python 3 code in this block
print('Python v3.5 or above required for Instaloader module at the moment. Exiting...')
quit()
@muhammedfurkan
muhammedfurkan / FastTelethon.py
Created April 28, 2022 08:22 — forked from painor/FastTelethon.py
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO