Skip to content

Instantly share code, notes, and snippets.

View imesut's full-sized avatar

Mesut Yılmaz imesut

View GitHub Profile
@SwapnanilDhol
SwapnanilDhol / ItemDetailSource.swift
Created August 21, 2020 13:06
A UIActivity Helper Class to show thumbnail preview and text in the share sheet title area
//
// ItemDetailSource.swift
// StickerTweet
//
// Created by Swapnanil Dhol on 7/9/20.
// Copyright © 2020 Swapnanil Dhol. All rights reserved.
//
import UIKit
import LinkPresentation
@aliorhun
aliorhun / coronaogren.py
Last active July 13, 2020 23:59
Corona günlük sayı öğrenme
#!/usr/bin/env python
import pytesseract
from PIL import Image, ImageOps
from io import BytesIO
import requests
import json
import os
from datetime import datetime
import locale
@davestevens
davestevens / LetsEncrypt.md
Last active March 28, 2024 10:35
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@darkyen
darkyen / gist:120c46739985ebf3b39b
Created June 10, 2015 03:40
Ferengi Rules of Acquisition [Complete List*]
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)
@kloon
kloon / gist:4541017
Last active January 26, 2024 18:14
WooCommerce Clear Cart via URL
// check for clear-cart get param to clear the cart, append ?clear-cart to any site url to trigger this
add_action( 'init', 'woocommerce_clear_cart_url' );
function woocommerce_clear_cart_url() {
if ( isset( $_GET['clear-cart'] ) ) {
global $woocommerce;
$woocommerce->cart->empty_cart();
}
}