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 bash | |
{ | |
echo foo 1 | |
sleep 1 | |
echo bar 1 >&2 | |
echo foo 2 | |
sleep 1 | |
echo bar 2 >&2 | |
} \ |
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 bash | |
[ -f test.log ] && rm -f test.log | |
{ | |
{ | |
echo foo 1 | |
sleep 1 | |
echo bar 1 >&2 | |
echo foo 2 |
First, you have only one table to handle everything, in order to keep the model design and the data integrity at only one point.
This is the basic idea, you can extend the design with the created_by
& updated_by
columns if you need.
The following implementation is for MySQL, but the idea can be implemented at other kind of SQL databases too.
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 bash | |
# https://towardsdatascience.com/uploading-files-to-google-drive-directly-from-the-terminal-using-curl-2b89db28bb06 | |
# Require "curl" | |
# $ sudo apt install curl # Linux Debian/Ubuntu | |
# $ brew install curl # Mac | |
_err() { | |
echo >&2 "Error! $*" |
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(window.__meetMutePlay__){console.warn('Already loaded!');}else{(function(){ | |
const log = (...args) => console.info('Mute-Play:', ...args); | |
if (!('mediaSession' in navigator)) { log('The Media Session API is not yet available. Try Chrome for Android.'); return; } | |
const muteBtn = document.querySelector('[data-is-muted] > div'); | |
if (!muteBtn) { log('Mute button not found!'); return; } | |
navigator.mediaSession = navigator.mediaSession || {}; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> --> | |
<title>Listado de Items para jugar con el DOM</title> |
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
<?php | |
/** | |
* Get array value by path. | |
* | |
* @param string|array $path Array Path. | |
* @param mixed $data Data where search. | |
* @param mixed|null $default Default value on path not found. | |
* @return mixed|null Value. | |
* @see https://stackoverflow.com/a/27930028/717267 |
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 bash | |
# https://gist.github.com/reduardo7/00928a0a50bf51f7c9ba218e95eb37c3 | |
################# Connect to Mongo DB ################# | |
# Params: | |
# - Environment: uat/prod | |
# - POD Name: Optional. Specific POD. | |
# | |
# Examples: |
NewerOlder