Skip to content

Instantly share code, notes, and snippets.

View esquinas's full-sized avatar

Enrique Esquinas esquinas

  • Asturias, Spain
View GitHub Profile
@kostyay
kostyay / Caddyfile
Created April 16, 2024 20:47
Rails app with Postgres and Caddy on Hetzner VPS with Docker Compose
{
email my@email.com
}
my.host.com {
encode zstd gzip
log {
output stdout
}
@dhh
dhh / linux-setup.sh
Last active July 19, 2024 07:52
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
@steven2358
steven2358 / ffmpeg.md
Last active July 22, 2024 08:40
FFmpeg cheat sheet
@esquinas
esquinas / google-sheet-visibility.gs
Last active January 3, 2023 18:54
Check visibility of hidden rows and columns in Google Spreadsheet App Script
/*
USAGE EXAMPLES:
Is the tenth row hidden?
> isRowHidden(sheet.getRange('B10'))
Is column B hidden?
> isColumnHidden(sheet.getRange('B10'))
Is cell B10 visible? (not in a hidden row and/or column)
@benlk
benlk / 0-toc.md
Last active March 29, 2023 13:13
Collection of notes on WP_UnitTestCase
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
  • ?
@mohandere
mohandere / yoast-seo-sitemap.php
Last active July 6, 2024 04:54
Wordpress yoast seo plugin, generate custom sitemap for custom URLS
<?php
/**
* Create a new custom yoast seo sitemap
*/
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' );
add_action( 'init', 'init_wpseo_do_sitemap_actions' );
// Add custom index
@mjdarby
mjdarby / ansi2html-withreverse.sh
Created September 17, 2014 22:19
A dodgy edit of ansi2html to support reverse colours
#!/bin/sh
# Convert ANSI (terminal) colours and attributes to HTML
# Licence: LGPLv2
# Author:
# http://www.pixelbeat.org/docs/terminal_colours/
# Examples:
# ls -l --color=always | ansi2html.sh > ls.html
# git show --color | ansi2html.sh > last_change.html
@duckinator
duckinator / switch.rb
Last active June 13, 2016 10:11 — forked from jbr/switch.rb
# In response to:
# http://mlomnicki.com/ruby/tricks-and-quirks/2011/02/10/ruby-tricks2.html
# Ruby 1.9.2 has some neat stuff that lets us make a readable
# alternative case statement that calls each method in turn.
# 1.9.2 features used:
# * hashes are ordered in 1.9.2
# * cool JSON-style hash syntax
# * concise lambda syntax
@willurd
willurd / web-servers.md
Last active July 23, 2024 17:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000