Skip to content

Instantly share code, notes, and snippets.

View kaitoukid-1412's full-sized avatar

kaitoukid-1412

View GitHub Profile
@jvloo
jvloo / popbot-v3.1.3.js
Last active June 23, 2022 15:00
POPCAT Popbot v3.1 script
/**
POPCAT Popbot v3.1 (Direct send pops to API & bypass bot detection)
https://github.com/jvloo/popcat-popbot/
@version 3.1.3
@author Xavier Loo <xavier@senangprint.com>
- Get Started: https://github.com/jvloo/popcat-popbot/blob/main/README.md
- Troubleshoot Guide: https://github.com/jvloo/popcat-popbot/wiki
**/
@WPVNdev
WPVNdev / showCalculateSavedPricingWooCommerce.php
Last active December 14, 2021 11:15
Thêm mục hiển thị số tiền giảm giá ở trang chi tiết sản phẩm nằm phía dưới giá sản phẩm hoặc variations WooCommerce
<?php
// Thêm hiển thị số tiền giảm giá ở trang chi tiết sản phẩm nằm phía dưới giá sản phẩm
function customVariableSavedPricing($priceHtml, $product)
{
if (strpos($priceHtml, 'del') !== false) {
$savedPrice = number_format($product->get_regular_price() - $product->get_sale_price(), 2, '.', ',');
$youSaved = sprintf(
∧ ∧
(*‘ω‘ *)
(   )
v v   ぽいんっ
@wcarhart
wcarhart / 🐍 PyTricks.py
Last active February 26, 2023 13:46
List of Python tricks from Dan Bader's (realpython.com) newsletter
# List of Python tricks from Dan Bader's (realpython.com) newsletter
# ===================================== #
# How to merge two dictionaries (3.5+)
x = {'a': 1, 'b': 2}
y = {'b': 3, 'c': 4}
z = {**x, **y}
print(z)
# {'c': 4, 'a': 1, 'b': 3}
console.log(`%c ________________________________________
< mooooooooooooooooooooooooooooooooooooo >
----------------------------------------
\\ ^__^
\\ (oo)\\_______
(__)\\ )\\/\\
||----w |
|| ||`, "font-family:monospace")
@klepsydra
klepsydra / sync-fail2ban.sh
Last active January 11, 2024 15:11
Block globally reported hack attempts using your local iptables firewall rules
#!/bin/bash
## Update fail2ban iptables with globally known attackers.
## Actually, runs 100% independently now, without needing fail2ban installed.
##
## /etc/cron.daily/sync-fail2ban
##
## Author: Marcos Kobylecki <fail2ban.globalBlackList@askmarcos.com>
## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done