Skip to content

Instantly share code, notes, and snippets.

View saurindashadia's full-sized avatar
🎯
Focusing

Saurin Dashadia saurindashadia

🎯
Focusing
View GitHub Profile
@saurindashadia
saurindashadia / 00-README.md
Created November 6, 2024 03:27 — forked from gboddin/00-README.md
cyberpanel 0day leaked attack script

CyberPanel PSAUX attack/defense

WARNING: Please use good judgement and extra caution before downloading and running something provided in the comment section of this gist.

This repo contains 2 things:

  • A decryption script
  • A list of files found on the threat-actor's server

Ransomware status

@saurindashadia
saurindashadia / manual-gravity-forms
Created August 29, 2023 06:10 — forked from keithdevon/manual-gravity-forms
Manually create entries and send notifications with Gravity Forms
<?php
// Manually create entries and send notifications with Gravity Forms
$form_id = 10;
// add entry
$entry = array(
"form_id" => $form_id,
"1" => "Entry for field ID 1",
@saurindashadia
saurindashadia / delete-acf-data-after-field-removal.php
Created November 25, 2021 05:03 — forked from ivo-ivanov/delete-acf-data-after-field-removal.php
Delete all data from WP database when an ACF field is deleted. #wordpress #acf
/*Deleting content when an ACF field is deleted is easy, relatively. Please note that the use of this function cannot be undone and it will erase all traces of content for any ACF field that is deleted.
Please be sure that this is something that you want to do before implementing this and I would strongly suggest that this is only enabled during development and not on a live site. Should a client go into ACF for some reason and delete a field, there is nothing that you’d be able to do to recover form it. */
// this action is run by ACF whenever a field is deleted
// and is called for every field in a field group when a field group is deleted
add_action('acf/delete_field', 'delete_acf_content_on_delete_field');
function delete_acf_content_on_delete_field($field) {
// runs when acf deletes a field
@saurindashadia
saurindashadia / update.php
Created May 25, 2021 02:54 — forked from thisislawatts/update.php
Force database upgrade
<?php
class acf_update {
/*
* __construct
*
* A good place to add actions / filters
*
* @type functionac
@saurindashadia
saurindashadia / .block
Created October 27, 2020 17:19 — forked from gkhays/.block
Oscillating Sine Wave Rendered with JavaScript
license: cc-by-4.0
@saurindashadia
saurindashadia / view_template_files.php
Created October 5, 2020 13:08 — forked from gatespace/view_template_files.php
WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 WordPressがデバッグモードのときのみ表示します。 使っているテンプレートファイルはグローバル変数 $template に保存されています。 (ただし、header.php や get_template_part などでインクルードされているファイルを除く) wp_footerにフックする形で関数が実行されますので、テーマのfunctions.phpの適当な箇所に追記してください。
/*
WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。
ただし、header.php や get_template_part などでインクルードされているファイルを除く。
*/
add_action('wp_footer', 'view_template_files');
if ( !function_exists( 'view_template_files' ) ):
function view_template_files() {
if ( defined('WP_DEBUG') && WP_DEBUG ) {
global $template;
@saurindashadia
saurindashadia / gist:d07ad040647353a5369cfa98aff70411
Created December 17, 2019 10:19 — forked from kewogc/gist:1d679c6c83977d69106f
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata
@saurindashadia
saurindashadia / gist:dbdf5a49779d04b961688f2491158294
Created December 17, 2019 10:19 — forked from kewogc/gist:1d679c6c83977d69106f
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata
@saurindashadia
saurindashadia / PHPVersions
Created October 27, 2018 08:05
Install Different PHP versions in Ubuntu
// Check PHP version
$ php -v
// Add PPA for PHP
$ sudo add-apt-repository ppa:ondrej/php
// update
$ sudo apt-get update
//For Apache Web Server
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04