Skip to content

Instantly share code, notes, and snippets.

View esolitos's full-sized avatar

Marlon (Esolitos) Saglia esolitos

View GitHub Profile
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active August 9, 2024 05:27
Block Meta and Twitter (nginx)
@andreaganduglia
andreaganduglia / disneyplus-on-linux.js
Created November 10, 2022 10:34
A Tampermonkey script to watch Disney+ on Linux
// ==UserScript==
// @name DisneyPlus on Ubuntu
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Set custom navigator.userAgent
// @author Andrea Ganduglia - Based on https://gist.github.com/moehlone/bed7dd6cb38fc55bd640
// @match https://www.disneyplus.com/*
// @grant none
// ==/UserScript==
@kanlukasz
kanlukasz / ssh-exit-codes.sh
Created March 28, 2022 05:39 — forked from asiegman/ssh-exit-codes.sh
Understanding SSH and exit codes in Bash scripts.
#!/bin/bash
#
# SSH Exit Codes
#
# Using SSH in scripting is pretty standard, but sometimes you want to stop execution of a script
# if a command inside an SSH session fails to exit cleanly (return 0). The key to remember is that
# the ssh command's exit code will be that of the *last executed* command inside the ssh session, just
# like a bash script ends with the exit code of the last command executed unless you specifically
# call exit.
#
@stevewithington
stevewithington / bash-ansi-variables-colorized-echo-output.md
Created April 16, 2021 14:26
Bash ANSI Variables for Colorized Echo Output

Bash ANSI Variables for Colorized Echo Output

I wanted to be able to make some messaging stand out while running Azure Pipeline Builds. This is ultimately what worked for me.

Example Usage

Some simple examples of how to use the variables listed below.

One Color for the Entire Line

@painor
painor / FastTelethon.py
Last active October 14, 2024 08:25
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO
@mparker17
mparker17 / fix-d8-empty-install-profile.md
Last active July 26, 2023 04:36
Fixing a Drupal 8 site with an empty install profile

Fixing a Drupal 8 site with an empty install profile

You'll probably notice this because of a series of errors like the ones below on the status report at /admin/reports/status:

    Notice: Undefined index: name in system_requirements() (line 59 of core/modules/system/system.install).
    Notice: Undefined index: version in system_requirements() (line 61 of core/modules/system/system.install).

To fix this...

  1. Check settings.php and settings.local.php in the order they are parsed for lines that look like $settings['install_profile']
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
export function magicMethods (clazz) {
// A toggle switch for the __isset method
// Needed to control "prop in instance" inside of getters
let issetEnabled = true
const classHandler = Object.create(null)
// Trap for class instantiation
classHandler.construct = (target, args, receiver) => {
// Wrapped class instance
@esolitos
esolitos / 0.DRCMD.README.md
Last active May 4, 2022 14:27
Drush command "executor" on alias pattern. Built for Wodby aliases naming standard, but can work on other setups.

DrCmd - DrushComander

drush command runner for Wodby aliases

0. Install

Save the file in /usr/local/bin/ (or anywhere else as long as it is in your $PATH) and verify that it is executable.

a. Right click on "Raw" button (for drcmd) and copy the URL.

@geerlingguy
geerlingguy / ansible-role-test.sh
Last active January 18, 2024 17:37
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)