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
@raulillana
raulillana / console.js
Last active May 23, 2024 18:54
Steam Workshop Scraper for mods (WorkshopID and ModID)
/**
* 1. Execute this code in the console of your Workshop collection page.
* ex: https://steamcommunity.com/sharedfiles/filedetails/?id=3247039796
* 2. Wait for the CSV to download.
* 3. Import in excel and clean maps.
*/
async function obtenerDetallesMods() {
const collectionItems = document.querySelectorAll('#profileBlock .collectionItem');
const detallesMods = [];
@raulillana
raulillana / countries.csv
Created September 28, 2023 18:17
Countries CSV with data for WP GoMaps plugin
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 34 columns, instead of 15. in line 7.
_key,map_width,map_height,map_start_location,map_title,map_start_lat,map_start_lng,map_start_zoom,default_marker,type,alignment,directions_enabled,styling_enabled,styling_json,active,kml,bicycle,traffic,dbox,dbox_width,listmarkers,listmarkers_advanced,filterbycat,ugm_enabled,ugm_category_enabled,fusion,map_width_type,map_height_type,mass_marker_support,ugm_access,order_markers_by,order_markers_choice,show_user_location,default_to
1,100,400,,Afghanistan,33.9391,67.7100,5,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
2,100,400,,Albania,41.1533,20.1683,6,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
3,100,400,,Algeria,28.0339,1.6596,5,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
4,100,400,,Andorra,42.5063,1.5218,7,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
5,100,400,,Angola,-11.2027,17.8739,4,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
6,100,400,,Antigua and Barbuda,17.0608,-61.7964,10,,0,0,0,0,,0,,0,0,1,100,0,0,0,0,0,,%,px,0,0,1,1,0,
7,100,400,,Argentina,-38.4161,-63.6167,4,,0,0,0,0,,0
@raulillana
raulillana / countries.txt
Created September 28, 2023 16:00
ChatGPT generated list of countries with GEO data
1. map_title → Afghanistan
- map_start_lat → 33.9391
- map_start_lng → 67.7100
- map_start_zoom → 5
2. map_title → Albania
- map_start_lat → 41.1533
- map_start_lng → 20.1683
@raulillana
raulillana / bash.sh
Created December 14, 2021 12:00
Log4j apartheid
#Find evidence of log4j usage on Linux servers with these 3 commands
ps aux | egrep '[l]og4j'
find / -iname "log4j*"
lsof | grep log4j
#Find places to which your applications write logs
lsof | grep '\.log'
@raulillana
raulillana / functions.php
Created November 17, 2021 10:26
Array PHP de ciudades de Cataluña
<?php
$ciudades_cat = [
// Barcelona
'Abrera' => 'Abrera',
'Aguilar de Segarra' => 'Aguilar de Segarra',
'Aiguafreda' => 'Aiguafreda',
'Alella' => 'Alella',
'Alpens' => 'Alpens',
'Ametlla del Vallès, L′' => 'Ametlla del Vallès, L′',
'Arenys de Mar' => 'Arenys de Mar',
@raulillana
raulillana / functions.php
Created October 6, 2021 01:09
Create files in themes from WP Editor
<?php
// add files to child theme
add_action( 'after_setup_theme', function() {
$file = get_stylesheet_directory() . '/footer.php';
touch( $file );
});
@raulillana
raulillana / functions.php
Created August 20, 2020 15:04
Remove WordPress default Blog Post Type (because sometimes, there's just no blog, LOL…)
<?php
/**
* Remove default Posts type since NO BLOG LOL
*
* Remove side menu
*/
function mercs_remove_default_post_type() {
remove_menu_page( 'edit.php' );
}
add_action( 'admin_menu', 'mercs_remove_default_post_type' );
@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
@raulillana
raulillana / wp-config.php
Created October 17, 2019 15:57
Removes the WordPress verification of SSL Providers (local and remote) to avoid self signed certificates cURL error 60
<?php
// Fixes: "cURL error 60: SSL certificate problem: self signed certificate".
// Removes SSL Providers verification
if ( 'development' === WP_ENV ) {
add_filter( 'https_ssl_verify', '__return_false' );
add_filter( 'https_local_ssl_verify', '__return_false' );
}
@raulillana
raulillana / whatever.php
Created January 20, 2019 19:52
Require or include wp-load.php dynamically on Trellis Stack
<?php
// Require or include wp-load.php dynamically on Trellis Stack
// Consider double-checking your custom app env vars for correct routing
$parse_uri = explode( 'app', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp/wp-load.php' );