Skip to content

Instantly share code, notes, and snippets.

View IlanVivanco's full-sized avatar
💡
Coding!

Ilán Vivanco IlanVivanco

💡
Coding!
View GitHub Profile
@IlanVivanco
IlanVivanco / index.html
Last active February 23, 2026 14:23
naropa-tree
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Naropa Tree Test</title>
<style>
body {
@IlanVivanco
IlanVivanco / signoff.sh
Last active April 8, 2025 18:48
Creates a signoff folder based on a git branch
#!/bin/bash
# Get current branch name
current_branch=$(git branch --show-current | sed 's|/|-|g')
# Create signoff folder
signoff_dir="signoff"
mkdir -p "$signoff_dir"
# Always use current directory as source
@IlanVivanco
IlanVivanco / rebase.sh
Created April 8, 2025 17:08
Rebase branch to fixup duplicate commits
#!/bin/bash
# Step 1: Generate commit log (oldest first) with parent info
git log --pretty=format:"%h|%ad|%an|%s|%p" --date=short --reverse >git_log.txt
# Step 2: Initialize
declare -A seen
>rebase-plan.txt
# Step 3: Process each line
@IlanVivanco
IlanVivanco / extract-applicants.js
Last active January 15, 2025 15:36
Extracts useful data from the Applicants view on LinkedIn
// ==UserScript==
// @name Extract LinkedIn Applicants
// @namespace http://tampermonkey.net/
// @version 2025-01-15
// @description Extracts useful data from the Applicants view on LinkedIn
// @author Ilán Vivanco - https://ilanvivanco.com
// @match https://www.linkedin.com/hiring/jobs/xxxxxx/applicants/xxxxx/detail/?r=UNRATED%2CGOOD_FIT%2CMAYBE
// @icon https://www.google.com/s2/favicons?sz=64&domain=linkedin.com
// @grant none
// ==/UserScript==
@IlanVivanco
IlanVivanco / cache.php
Last active December 30, 2024 09:19
Clear all possible WP cache systems
<?php
if ( ! function_exists( 'lets_clear_cache' ) ) {
function lets_clear_cache() {
// WP Rocket
if ( function_exists( 'rocket_clean_domain' ) ) {
rocket_clean_domain();
}
// W3 Total Cache : w3tc
@IlanVivanco
IlanVivanco / nginx.conf.hbs
Last active August 2, 2024 12:06
nginx config for external assets on local
http {
# (...)
# Define the cache path
proxy_cache_path "{{root}}\\wp-content\\cache" levels=1:2 keys_zone=nginx_cache:10m max_size=1g inactive=60m use_temp_path=off;
# Log errors in debug mode
# error_log "{{logs.errorLog}}" debug;
# (...)
@IlanVivanco
IlanVivanco / apache.conf
Last active August 1, 2024 23:17
Apache config for external assets on local
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^example\.test$
RewriteRule ^wp-content/uploads/(.*)$ https://example.com/wp-content/uploads/$1 [NC,L]
</IfModule>
@IlanVivanco
IlanVivanco / get-posts.php
Last active June 12, 2024 19:12
Get post data from DB
<?php
// Hook into the admin menu action to add the options page.
add_action( 'admin_menu', 'epic_add_admin_page' );
function epic_add_admin_page() {
// Add a new submenu page under Settings tab
add_submenu_page(
'options-general.php',
'Epic Posts Listing',
@IlanVivanco
IlanVivanco / phpcs.xml
Last active March 8, 2024 17:09
PHPCS WordPress coding standards config file
<?xml version="1.0"?>
<ruleset name="WordPress Theme Coding Standards"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>A custom set of rules to check for a WPized WordPress project</description>
<!-- General PHPCS config. -->
<file>.</file>
<arg value="sp"/>
<arg name="extensions" value="php"/>
@IlanVivanco
IlanVivanco / wp-redirects.php
Last active February 13, 2024 22:41
WP Redirect Log
<?php
/**
* Plugin Name: Debug - WP Redirect
* Description: Adds debugging output to the HTTP header response to find out which file/function triggered a redirect.
* Author: Philipp Stracker
* Author URI: http://www.stracker.net/
* Created: 15.09.2015
* Version: 1.0.0
*
* Simply activate the plugin and it will add debugging information to all