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
All | Todos | |
systemctl list-unit-files | |
Enabled | Habilitados | |
systemctl list-unit-files | grep enabled | |
Disabled | Deshabilitados | |
systemctl list-unit-files | grep disabled |
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
cat file.in | sed '/^$/d' >file.out | |
# | |
sed -i '/^$/d' file.in.place |
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
https://mycolor.space/gradient | |
http://paletton.com/ |
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
REVIEW: timedatectl list-timezones | |
GET: timedatectl status | |
SET: timedatectl set-timezone America/Mexico_City | |
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
Actualizar una imagen (p.ej myssql) | |
docker pull mysql | |
docker stop my-mysql-container | |
docker rm my-mysql-container | |
docker run --name=my-mysql-container --restart=always -e MYSQL_ROOT_PASSWORD=mypwd -v /my/data/dir:/var/lib/mysql -d mysql | |
show current docker images running | |
docker ps | |
show last images running and stopped |
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
remove first column | |
cat stuff.txt | awk '{$1=""}1' | awk '{$1=$1}1' | |
remove empty lines | |
cat stuff.txt | sed '/^$/d' | |
sed -i '/^$/d' stuff.txt |
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
put'em on: /usr/share/fonts/truetype/ | |
sudo fc-cache -f -v |
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
$str = 'In My Cart : 11 12 items'; | |
preg_match_all('!\d+!', $str, $matches); | |
print_r($matches); |
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
// array holding allowed Origin domains | |
$allowedOrigins = array( | |
'(http(s)://)?(www\.)?my\-domain\.com' | |
); | |
if (isset($_SERVER['HTTP_ORIGIN']) && $_SERVER['HTTP_ORIGIN'] != '') { | |
foreach ($allowedOrigins as $allowedOrigin) { | |
if (preg_match('#' . $allowedOrigin . '#', $_SERVER['HTTP_ORIGIN'])) { | |
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); | |
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); |
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
window.addEventListener( "pageshow", function ( event ) { | |
var historyTraversal = event.persisted || | |
( typeof window.performance != "undefined" && | |
window.performance.navigation.type === 2 ); | |
if ( historyTraversal ) { | |
// Handle page restore. | |
window.location.reload(); | |
} | |
}); |
OlderNewer