This file contains 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
<?php | |
declare(strict_types=1); | |
namespace MyApp\Helper; | |
use Psr\Log\LoggerInterface as Logger; | |
class GarantiPOS | |
{ | |
private const GARANTI_PAY_TYPE = 'gpdatarequest'; |
This file contains 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
# Asuming you have keybase installed and generated a gpg key | |
keybase pgp export # list your keybase gpg keys | |
# user: Mehmet Korkmaz <[email protected]> | |
# 4096-bit RSA key, ID GPG_KEY, created 2019-01-01 | |
keybase pgp export -q GPG_KEY | gpg --import | |
keybase pgp export -q GPG_KEY --secret --unencrypted| gpg --import --allow-secret-key-import | |
gpg --list-secret-keys --keyid-format LONG | |
# /Users/reformo/.gnupg/pubring.kbx | |
# --------------------------------- | |
# sec rsa4096/GPG_KEY 2019-01-06 [SC] [expires: 2035-01-02] |
This file contains 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
{ | |
"telemetry.enableCrashReporter": false, | |
"cSpell.userWords": [ | |
], | |
"editor.tabSize": 2, | |
"editor.insertSpaces": true, | |
"editor.detectIndentation": false, | |
"editor.fontFamily": "Consolas, Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 13, | |
"editor.minimap.enabled": false, |
This file contains 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
import cv2 | |
import pytesseract | |
from os import walk | |
pytesseract.pytesseract.tesseract_cmd = r'/usr/local/bin/tesseract' | |
config = u" -c tessedit_char_whitelist=0123456789 --oem 3 --psm 7 -l digits" | |
def solve(file): | |
image_file_name = './data/' + file | |
im = cv2.imread(image_file_name) |
This file contains 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
server { | |
listen 80; | |
listen [::]:80; | |
server_name cdn-images.example.com; | |
server_tokens off; | |
location / { | |
rewrite ^/(.*)/subfolder/(.*)$ /images/$1/anothersubfolder/anothersubfolder/$2; | |
proxy_pass https://my-bucketname.ams3.digitaloceanspaces.com/; | |
proxy_hide_header Strict-Transport-Security; | |
} |
This file contains 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
server { | |
listen 80; | |
listen [::]:80; | |
root /var/lib/www; | |
server_name _; | |
server_tokens off; | |
more_clear_headers Server; | |
add_header Server "selami/image-server"; |
This file contains 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
# Copied from https://github.com/sergejmueller/sergejmueller.github.io/wiki/Nginx%3A-Real-time-image-resizing-and-caching | |
# | |
# Requirements | |
# ngx_http_image_filter_module | |
# | |
# Usage | |
# http://localhost/imagine/picture.jpg?w=1024&q=75 | |
# http://localhost/imagine/picture.jpg?h=500&q=30 | |
# | |
# Parameter Description |
This file contains 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
# | |
# cron job runs at my-db-server with this configuration | |
# @daily pg_dump -Fc myRemoteDatabase > /var/lib/postgresql/backups/my-remote-database.dump | |
# | |
scp [email protected]:/var/lib/postgresql/backups/my-remote-database.dump ./temp.dump | |
pg_restore -h 127.0.0.1 -p 5432 -U postgres -c -d myLocalDatabase < ./temp.dump | |
psql -h 127.0.0.1 -p 5432 -U postgres -d myLocalDatabase -a -f ./reset-passwords.sql |
This file contains 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
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: php:7.1 | |
pipelines: | |
default: | |
- step: | |
caches: | |
- composer | |
script: |
This file contains 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
RewriteCond %{TIME_YEAR}%{TIME_MON}%{TIME_DAY} > 20170523 | |
RewriteRule ^$ /destination/url.html [R=301,L] |
NewerOlder