Skip to content

Instantly share code, notes, and snippets.

View necmettin's full-sized avatar

Necmettin Begiter necmettin

View GitHub Profile
@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
@f
f / kelimeler.json
Created January 23, 2022 22:14
kelimeler.json
This file has been truncated, but you can view the full file.
[
"a",
"ab",
"aba",
"aba",
"abacı",
"abacılık",
"abadi",
"abajur",
"abajurcu",
@maidis
maidis / haber-siteleri.txt
Last active April 30, 2020 04:12
Haber Siteleri
trthaber.com
medyajans.com
haber7.com
superhaber.tv
ntvmsnbc.com
aa.com.tr
cnnturk.com.tr
iha.com.tr
haberturk.com
ensonhaber.com
@peltho
peltho / svelte.md
Last active May 16, 2024 03:44
Svelte cheatsheet
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
@geddski
geddski / Brewfile
Last active November 13, 2022 13:28
Dave Geddes' Brewfile for awesome mac automation
cask_args appdir: "/Applications"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/cask-fonts"
tap "homebrew/core"
brew "fish"
brew "git"
brew "httpie"
brew "github/gh/gh"
@edisdev
edisdev / date.js
Last active May 11, 2021 10:37
Ay ve Günlerin Javascript İle Dil Ayarı İçin Ufak Bir Yöntem
function calendarTranslation(lang) {
const currentYear = new Date().getFullYear()
const months = Array.from({length: 12}, function(_, index) {
let name = new Date(currentYear, index).toLocaleString(lang, { month: 'long' })
return ({index, name })
})
const days = Array.from({length: 7}, function (_, index) {
let name = new Date(currentYear, '00', index).toLocaleString(lang, { weekday: 'long' })
@loilo
loilo / magic-methods.js
Last active June 15, 2024 07:36
PHP Magic Methods in JavaScript
function magicMethods (clazz) {
// A toggle switch for the __isset method
// Needed to control "prop in instance" inside of getters
let issetEnabled = true
const classHandler = Object.create(null)
// Trap for class instantiation
classHandler.construct = (target, args, receiver) => {
// Wrapped class instance
@giansalex
giansalex / docker-php-ext-install.md
Last active June 18, 2024 08:44
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/