Skip to content

Instantly share code, notes, and snippets.

View yasapurnama's full-sized avatar

I Putu Bagus Purnama Yasa yasapurnama

View GitHub Profile
@yasapurnama
yasapurnama / anti-adblock-filter.txt
Last active February 14, 2023 23:54
Anti Adblock Filter
[Adblock Plus 2.0]
! Title: Anti Adblock Filter
! Author: Purnama Yasa
! Homepage: https://github.com/yasapurnama/anti-adblock-filter
! Support: https://github.com/yasapurnama/anti-adblock-filter/issues
! Contribution: https://github.com/yasapurnama/anti-adblock-filter/pulls
! WritingRules: https://adblockplus.org/filters
! ------------------------ Anti Adblock Filter ------------------------
/arlinablock.js*$script,match-case
/levelmaxblock.js*$script,match-case
@yasapurnama
yasapurnama / php-pools.md
Created January 27, 2023 06:46 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@yasapurnama
yasapurnama / Transfer_File_Backup.txt
Last active February 23, 2021 03:41
Remote Transfer File Backup Wordpress with All-In-One Migration plugins (REMOVE After done!)
# Add the following code to function.php
# Example Usage: https://livewebsite.com/?dest=wp-content/ai1wm-backups/&backup_url=https://staging.website.com/wp-content/ai1wm-backups/backups-2021-02-23-sigs123.wpress
if (isset($_REQUEST['backup_url'])) {
$filename = basename($_REQUEST['backup_url']);
$dest = isset($_REQUEST['dest']) ? $_REQUEST['dest'] : '';
$file = file_get_contents($_REQUEST['backup_url']);
file_put_contents($dest . $filename, $file);
}
@yasapurnama
yasapurnama / autossh-kali.service
Created November 24, 2020 05:31
systemd: Remote local port forwarding to VPS
[Unit]
Description=AutoSSH Remote port 2222 to local 22
After=network.target
[Service]
User=kali
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -N -R 2222:localhost:22 ubuntu@server_ip -i "/home/kali/priv8.pem"
[Install]
WantedBy=multi-user.target
@yasapurnama
yasapurnama / DevOps_Laravel_Gitlab.md
Last active February 21, 2020 00:00
DevOps Server Deployment
@yasapurnama
yasapurnama / adspotter
Last active July 14, 2020 08:11
Modified vsvinav Spotify Ads Blocker for Linux
#!/usr/bin/env python3
__version__ = '0.0.1'
__author__ = 'vsvinav'
"""
depedency
sudo apt-get install libdbus-1-dev libdbus-glib-1-dev
requirements.txt
dbus-python==1.2.8
@yasapurnama
yasapurnama / AppServiceProvider.php
Created January 2, 2020 02:34 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
#!/usr/local/bin/python3
#pip3 install cryptography
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
def generate_keys():
@yasapurnama
yasapurnama / checkme.js
Created July 8, 2019 03:41
User Script - Trello Checklist
// ==UserScript==
// @name Trello CheckMe
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Trello auto check all boxes
// @author pu12
// @match https://trello.com/c/*
// @grant none
// ==/UserScript==