docker images -q ubuntu:latest
pega id das últimas imagens antes da latest (não inclui a última antes da latest, para fins de backup)
docker images -q --filter "before=ubuntu:latest" --format "{{.ID}}" | awk 'NR>1'
$(window).scroll(function(){ | |
if ($(window).scrollTop() == $(document).height() - $(window).height()){ | |
// calling the function to get the ajax data | |
loadMore(); | |
} | |
}); | |
function loadMore() { | |
$.ajax({ | |
url: base_url + "/infscroll/get_inf_scroll_ajax", |
## Docker | |
Find the container: docker ps -a | |
Delete container: docker rm -v <container_name> | |
List all images: docker image ls | |
Delete image by tag: docker image rmi _tag_ --force | |
Remove unused images: docker image prune --all --force | |
See space used by docker: docker system df | |
Remove dangling images: docker rmi $(docker images -f "dangling=true" -q) --force |
# Terminator | |
## https://github.com/gnome-terminator/terminator | |
# unbind default terminal command | |
# gsettings set org.gnome.settings-daemon.plugins.media-keys terminal '[]' | |
# Go to Settings -> Devices -> Keyboard and scroll to the end. Press + and you will create custom shortcut. | |
# Enter name: "terminator", command: /usr/bin/terminator -l "layout-custom" | |
sudo add-apt-repository ppa:mattrose/terminator |
<?php | |
use Illuminate\Support\Facades\Crypt; | |
trait Encryptable | |
{ | |
/** | |
* Decrypt the column value if it is in the encrypted array. | |
* | |
* @param $key |
find . -maxdepth 1 -type d -mtime +20 -exec rm -rf {} \; |
version: '3.6' | |
services: | |
kiloview: | |
image: kiloview/klnkserver:latest | |
restart: always | |
ports: | |
- '82:82' | |
- '60000:60000/udp' | |
- '60001:60001/udp' |
<?php | |
$b = 'González'; | |
function Unaccent($string) | |
{ | |
return preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')); | |
} | |
Unaccent($b); |
zip -r -s 5G file.zip path/to/folder | |
cat file.z* > merged.zip |
services: | |
zlmediakit: | |
image: zlmediakit/zlmediakit:master | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- capabilities: [gpu] | |
environment: | |
- NVIDIA_VISIBLE_DEVICES=all |