Skip to content

Instantly share code, notes, and snippets.

View 0x1881's full-sized avatar
🎯
Focusing

Mehmet Can 0x1881

🎯
Focusing
View GitHub Profile
@0x1881
0x1881 / avd-prepare-first-time.sh
Created May 8, 2024 12:30 — forked from sleekweasel/avd-prepare-first-time.sh
Bash/adb automation for setting up avds
#!/bin/bash
uidump=/tmp/${0##*/}.$$
unsyncd_uidump_matching_lines() {
adb shell 'rm -f /sdcard/dump.* && uiautomator dump /sdcard/dump.xml 2>/sdcard/dump.err && cat /sdcard/dump.xml' |
tr '<' "\n" |
tee $uidump.full |
grep -Ei "$1" |
xargs -rn1 |
@0x1881
0x1881 / remoteDebugging.md
Created April 30, 2024 07:20 — forked from royshouvik/remoteDebugging.md
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.
@0x1881
0x1881 / tat_nhan_khau_hoc.js
Created September 28, 2023 12:53 — forked from quangquy87/tat_nhan_khau_hoc.js
TẮT GIỚI TÍNH & ĐỘ TUỔI
/****************************
* Loại bỏ giới tính + độ tuổi có hiệu suất kém ra khỏi nhóm quảng cáo
* Version 1.0 (21/07/2022)
*
* Created By: Quý Ngô
****************************/
var CONFIG = {
LAST_N_DAYS: 7, // thời gian quét từ ngày quét trở về trước đó
MAX_COST: 170000, // chi tiêu từ số này trở lên mới bắt đầu tính theo điều kiện dưới là CPA
@0x1881
0x1881 / php-html-css-js-minifier.php
Created June 21, 2023 00:10 — forked from Rodrigo54/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) {
@0x1881
0x1881 / php-html-css-js-minifier.php
Created June 20, 2023 21:54 — 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/x.minify>
namespace x\minify\_ { // start namespace
$n = __NAMESPACE__;
\define($n . "\\token_boolean", '\b(?:true|false)\b');
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+');
@0x1881
0x1881 / nginx-geoip-module.md
Created June 17, 2023 16:26 — forked from VirtuBox/nginx-geoip-module.md
How to configure GeoIP module for Nginx

Create a folder to store the databases :

mkdir -p /usr/share/GeoIP

Download Country IP database

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
@0x1881
0x1881 / slugify_tr.js
Created December 5, 2022 22:07 — forked from muratcorlu/slugify_tr.js
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) {
@0x1881
0x1881 / yt.php
Created November 2, 2022 17:18 — forked from lhuxman-lhux/yt.php
youtube download
<?php
if (file_exists('sig1.php')) {
unlink('sig1.php');
}
function getc($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
@0x1881
0x1881 / Direct Link of YouTube videos.md
Created November 2, 2022 17:17 — forked from egyjs/Direct Link of YouTube videos.md
PHP API To get Direct Link of YouTube videos
@0x1881
0x1881 / torrc
Created October 27, 2022 14:12 — forked from Alex0007/torrc
tor configuration for surfing speed
DNSPort 9053
ExcludeSingleHopRelays 0
AllowSingleHopCircuits 1
KeepalivePeriod 60
#NewCircuitPeriod 15
UseEntryGuards 1
NumEntryGuards 8
CircuitBuildTimeout 5
EnforceDistinctSubnets 0
OptimisticData 1