Skip to content

Instantly share code, notes, and snippets.

View raulillana's full-sized avatar
🚀
Working from #homefficestudio!

Raul Illana raulillana

🚀
Working from #homefficestudio!
View GitHub Profile
@rameerez
rameerez / telegram-mtproxy.md
Last active June 2, 2024 14:29
Telegram Proxy How-To: complete and up-to-date MTProxy tutorial

How to set up a Telegram Proxy (MTProxy)

This tutorial will teach you how to set up a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail, although you can use any other Linux distribution and cloud provider.

Using a Telegram proxy is a safe, easy and effective way of overcoming Telegram bans. It's useful, for example, to keep using Telegram under tyrannical regimes, or to circumvent judges' decisions to block Telegram.

Telegram proxies are a built-in feature in all Telegram apps (both mobile and desktop). It allows Telegram users to connect to a proxy in just one or two clicks / taps.

Telegram proxies are safe: Telegram sends messages using their own MTProto secure protocol, and the proxy can only see encrypted traffic – there's no way for a proxy to decrypt the traffic and read the messages. The proxy does not even know which Telegram users are using the proxy, all the proxy sees is just a list of IPs.

@sawirricardo
sawirricardo / session-timezone.blade.php
Created August 4, 2023 03:56
Update timezone using Laravel Livewire Volt
<?php
$updateTimezone = fn($timezone) => session()->put('timezone', $timezone);
?>
<div x-init="$wire.updateTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone)"></div>
@kingkool68
kingkool68 / use-remote-media.php
Last active March 24, 2024 11:37
Check if a local file exists in the WordPress media library and if it doesn't exist, replace the URL with a different URL. Helpful when working with a local site that doesn't have all of the media downloaded as the production site. See https://localwp.com/community/t/proxying-requests-to-wp-content-uploads-to-a-production-site/15701
<?php
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site.
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' );
// Put the rest of this in functions.php or a custom plugin or somewhere else.
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) {
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' );
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' );
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' );
}
@saimonh3
saimonh3 / dokan_get_product_attributes_by_order.php
Created November 18, 2019 07:24
Dokan export order attributes
<?php
/**
* Dokan get seller amount from order total
*
* @param int $order_id
*
* @return float
*/
function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
@raulillana
raulillana / country-list.txt
Last active May 15, 2023 16:01
Simple Country List for Elementor Select Form Input Value (Key|Value or Country Name|Country Name)
Afghanistan|Afghanistan
Åland Islands|Åland Islands
Albania|Albania
Algeria|Algeria
American Samoa|American Samoa
Andorra|Andorra
Angola|Angola
Anguilla|Anguilla
Antarctica|Antarctica
Antigua and Barbuda|Antigua and Barbuda
@cr0ybot
cr0ybot / sunrise.php
Last active December 11, 2023 16:27
WordPress Multisite Local/Staging/Live Dev Setup
<?php
/**
* File wp-content/sunrise.php
*
* This allows us to copy the production multisite database to staging/local and still use
* it directly without altering domains
*
* This file can be present on all copies of the site, but it should only be added to the
* wp-config file of local/staging (via `define( 'SUNRISE', true )`)
*
@danielstgt
danielstgt / imagick3.4.3-PHP7.3-forge.sh
Last active May 30, 2023 22:43 — forked from rostockahoi/imagick3.4.3-PHP7.2-forge.sh
Install Imagick 3.4.3 on PHP 7.3 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
// Export Products as columns
// Format - XLS
// Checked - Output column titles as first line
// Button - Export w/o Progressbar
class Woe_Product_Columns {
var $columns_per_product = 3;
function __construct() {
//add settings, , skip products
add_action("woe_settings_above_buttons", array($this,"draw_options") );
@BrynM
BrynM / README.md
Last active May 23, 2024 18:26
Steam Workshop Subscriptions Scraper

Steam Workshop Subscriptions Scraper

Description

This is just something I whipped up to dump a listing of my own subscriptions for a particular game. Unfortunately Vavle/Steam doesn't do such a thing natively and I had to get really creative for my list of several hundred items so I could share with a friend.

So I made this little monstrosity over an evening.

Use

@shopglobal
shopglobal / gist:75870369efd042031f67e98976892850
Created November 3, 2017 21:20
How To Set Up Automatic Deployment with Git with a VPS
Introduction
For an introduction to Git and how to install, please refer to the introduction tutorial.
This article will teach you how to use Git when you want to deploy your application. While there are many ways to use Git to deploy our application, this tutorial will focus on the one that is most straightforward. I assume you already know how to create and use a repository on your local machine. If not, please refer to this tutorial.
When you use Git, the workflow generally is toward version control only. You have a local repository where you work and a remote repository where you keep everything in sync and can work with a team and different machines. But you can also use Git to move your application to production.
Server Setup
Our fictitious workspace: