This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nu@Nestors-MacBook-Air bash-code % cat ~/Downloads/conectadrive-frontend-tweaks-sandbox/index5.html | |
<html lang="es" dir="ltr" data-lt-installed="true" style=" | |
display: flex; | |
"><head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Driver Management</title> | |
<link rel="icon" href="/faviconConecta.png"> | |
<style data-fullcalendar=""></style><link href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /opt/scripts/tree-gitignore.sh | |
# Author: Nestor Urquiza | |
# Date: 20240220 | |
# Description: A tree wrapper to show contents of a git project respecting .gitignore | |
# Usage: cd git-project && /opt/scripts/tree-gitignore.sh | |
cmd="tree -a -I '.git'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# clichatgpt.py | |
# | |
# A CLI script to interact with ChatGPT via API | |
# | |
# Nestor Urquiza 20230512 | |
# | |
import sys | |
import openai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# mongo-collection-to-csv.sh | |
# | |
# description: Exports all field from any mongodb collection to CSV | |
# author: Nestor Urquiza | |
# date: 20210218 | |
# env vars | |
password=$MONGODB_PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir=$1 | |
while true; do sleep 5; [ ! -z "$(ls $dir)" ] && date && ls -alrt $dir; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemd-resolve --flush-caches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One liner to find processes that have been running for over any amount of seconds | |
SECONDS=$1 | |
ps -e -o "pid,etimes,command" | awk '{if($2>$SECONDS) print $0}' | |
: ' | |
Explanation: | |
=========== | |
ps: process snapshot command | |
-e: list all processes | |
-o: include only specified columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt install apt-file | |
apt-file update | |
apt-file search traceroute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
if ( $multi_view->has_value( 'title', 'on' ) ) { | |
if ( is_et_pb_preview() && isset( $_POST['post_title'] ) && wp_verify_nonce( $_POST['et_pb_preview_nonce'], 'et_pb_preview_nonce' ) ) { | |
$post_title = sanitize_text_field( wp_unslash( $_POST['post_title'] ) ); | |
} else { | |
$post_title = esc_html( et_builder_get_current_title() ); | |
} | |
$post_title = esc_html__($post_title, 'et_builder'); // post title i18n fix | |
... |
NewerOlder