Skip to content

Instantly share code, notes, and snippets.

Avatar
🇹🇷
The mind is superior to the mind.

Avare Kodcu abdurrahmanekr

🇹🇷
The mind is superior to the mind.
View GitHub Profile
@rkdgusrn1212
rkdgusrn1212 / image_gamma_correction.py
Last active Jan 21, 2021
Image Gamma Correction using Pillow in Python.
View image_gamma_correction.py
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
gray_img = Image.open('Lenna.png').convert("LA")#밝기와 알파값을 이용해서 Grayscale로 변환
gray_img.save("lenna_gray.png")#grayscale로 변환된 흑백 이미지를 출력
row = gray_img.size[0]
col = gray_img.size[1]
gamma1 = 0.88
@fabiomontefuscolo
fabiomontefuscolo / new-of-plugin-dev.markdown
Last active May 1, 2021
Starting plugin development in Openfire
View new-of-plugin-dev.markdown

New Openfire Plugin

Install requirements

$ sudo pacman -S \
	intellij-idea-community-edition \
	jre8-openjdk \
	maven
@wahyudibo
wahyudibo / default.conf
Last active Apr 25, 2020
Install nginx, php 70 (with fpm), and mysql in Mac OS X
View default.conf
server {
listen 80;
server_name localhost;
root /Users/wahyudibo/Projects/mylabs/php/nginx;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
@jarretmoses
jarretmoses / React Native Clear Cache
Last active Oct 19, 2021
Clearing the Cache of your React Native Project
View React Native Clear Cache
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@teomaragakis
teomaragakis / spotihosts
Last active Oct 17, 2021
The hosts file entries to block Spotify audio ad servers.
View spotihosts
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 open.spotify.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 desktop.spotify.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 audio2.spotify.com
127.0.0.1 www.omaze.com
@ygotthilf
ygotthilf / jwtRS256.sh
Last active Oct 20, 2021
How to generate JWT RS256 key
View jwtRS256.sh
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@v0lkan
v0lkan / nginx.conf
Last active Oct 14, 2021
Configuring NGINX for Maximum Throughput Under High Concurrency
View nginx.conf
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@jshaw
jshaw / byobuCommands
Last active Oct 18, 2021
Byobu Commands
View byobuCommands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@taterbase
taterbase / upload.php
Created May 13, 2012
Simple file upload in php
View upload.php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>