Skip to content

Instantly share code, notes, and snippets.

View 0x1881's full-sized avatar
🎯
Focusing

Mehmet Can ÜSTÜL 0x1881

🎯
Focusing
View GitHub Profile
@muhittin
muhittin / turkceekler.php
Created August 7, 2011 20:55
Türkçe Ekler
<?php
/*ismin nikneymin sonuna gereken eki ekler */
function isimeki($ad, $ektipi= "in")
{
$sertsessizler = array("ç", "f", "h", "k", "p","s", "ş", "t");
/// türkçe sesli ve sert sessiz karakterler
$buyuk = array("A", "I", "E", "İ", "U","O", "Ü", "Ö", "Ç", "F", "H", "K", "P","S", "Ş", "T");
$kucuk = array("a", "ı", "e", "i", "u","o", "ü", "ö", "ç", "f", "h", "k", "p","s", "ş", "t");
@muratcorlu
muratcorlu / slugify_tr.js
Created September 11, 2012 12:46
Javascript Türkçe karakter destekli slugify (url metni oluşturucu)
/**
* Metni url'de kullanılabilir hale çevirir. Boşluklar tireye çevrilir,
* alfanumerik olmayan katakterler silinir.
*
* Transform text into a URL path slug(with Turkish support).
* Spaces turned into dashes, remove non alnum
*
* @param string text
*/
slugify = function(text) {
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@bramus
bramus / .htaccess
Last active August 16, 2024 06:02
URL Rewriting for Apache (requires mod_rewrite) and IIS (requires IIS url rewrite module)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
@plentz
plentz / nginx.conf
Last active October 22, 2025 16:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@nikcub
nikcub / torrc
Last active October 20, 2022 13:29
Tor Relay & Bridge Config
#
# tor relay / bridge config
#
# apt-get install tor
#
# yum install tor (after adding EPEL or similar as a repo)
#
# dump this config file into the default tor config file location (/etc/tor/torrc)
#
# see also: https://www.torproject.org/docs/installguide.html.en
@royshouvik
royshouvik / remoteDebugging.md
Last active April 14, 2025 08:06
Describes how to setup remote debugging on an Android device using Chrome

Remote Debugging on Android with Chrome

The way your web content behaves on mobile can be dramatically different from the desktop experience. Remote debugging with Chrome DevTools lets you debug live content on your Android device from your development machine.

Debugging Chrome for Android using the Chrome Developer Tools

Remote debugging on Android supports:

  • Debugging websites in browser tabs.
  • Debugging WebViews in native Android apps.
@mdpuma
mdpuma / gist:b5a7fdc7f0a052f77732
Last active May 2, 2022 08:03
scan php infections
#!/bin/bash
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E "mail\s*\(" |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E 'eval\(|move_uploaded_file' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'eval(stripslashes' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'eval($_' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'base64_decode(' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'base64_encode(gzcompress' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep "\\\x" |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E "(system|exec)\(" |less
@Rodrigo54
Rodrigo54 / php-html-css-js-minifier.php
Last active June 29, 2025 14:27 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@kremalicious
kremalicious / tor-relay-setup.sh
Last active November 26, 2023 02:59
Set up new server as Tor relay
##
# Ubuntu 16.04 Xenial Xerus
##
######################################
# INITIAL SERVER SETUP & HARDENING
######################################
ssh [email protected]