Skip to content

Instantly share code, notes, and snippets.

View maksathanja's full-sized avatar
💭
Progress, not perfection.

Maksat Hanja maksathanja

💭
Progress, not perfection.
View GitHub Profile
@hemantajax
hemantajax / media-queries.css
Last active March 2, 2024 07:05
Very useful media queries snippets
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@enginkartal
enginkartal / js-turkish-to-english.js
Last active April 22, 2024 13:11
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')
@rikschennink
rikschennink / cloudinary.js
Last active February 9, 2024 16:15
FilePond Cloudinary
const createCloudinary = (cloudName, unsignedUploadPreset) => ({
process: (fieldName, file, metadata, load, error, progress, abort) => {
// `fieldName` and `meta` are not used for now
const url = `https://api.cloudinary.com/v1_1/${cloudName}/upload`;
const xhr = new XMLHttpRequest();
const formData = new FormData();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>MultiLingual</title>
<style>
button {
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 22, 2025 11:58
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 23, 2025 12:48
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@holymong
holymong / WooCommerce-TC-Kimlik-ve-Vergi-No-Kurumsal-Fatura.php
Last active August 5, 2023 15:30
WooCommerce TC Kimlik ve Vergi No Kurumsal Fatura
* Ödeme ekranına geldiğinde 2 tane checkbox olacak. Biri "TC Kimlik No" opsiyonel diğeri "Kurumsal Fautra" opsiyonel.
* Müşteri bu alanlara 10 haneden az bir T.C. yada Vergi No yazarsa hata verecek.
* Kurumsal Fatura Checkbox'ı işaretlenirse Vergi Dairesi ve Vergi No alanı belirecek.
* TC Kimlik No Checkbox'ı işaretlenirse sadece TC Kimlik No alanı belirecek.
* Soyad şirket ünvanı girişinin doğru çalışabilmesi için gerekli değil opsiyonel olarak ayarlandı.
* Kurumsal Fatura seçildiğinde Ad Soyad ve Şirket Ünvanı billing_first_name alanında birleştirip tek bir Input olarak bıraklılmış
billing_last_name ve billing_company gizlenmiştir. TC Kimlik No seçildiğinde yada hiçbir şey seçilmediğinde Ad ve Soyad
iki farklı input olarak duruyor. billing_first_name,billing_last_name