Skip to content

Instantly share code, notes, and snippets.

@mercuriete
mercuriete / actualizar
Last active May 7, 2019 20:59
Upgrade my gentoo instalation
#!/bin/bash
eix-sync
emerge --update --deep --changed-use --newuse --with-bdeps=y @world --ask
emerge @preserved-rebuild
emerge --depclean --ask
revdep-rebuild
revdep-rebuild.sh -u --pretend
glsa-check --test all
@mercuriete
mercuriete / thermal-conf.xml
Created March 10, 2019 18:21
Thermald configuration of my laptop
<?xml version="1.0"?>
<ThermalConfiguration>
<Platform>
<Name>Intel Powered Laptop</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalZones>
<ThermalZone>
<Type>cpu</Type>
<TripPoints>
==========
VULKANINFO
==========
Vulkan Instance Version: 1.1.92
Instance Extensions:
====================
{
"environment": {
"architecture": "x86_64",
"comment": "",
"name": "gentoo",
"reportversion": "1.9",
"submitter": "",
"version": "unknown"
},
"extended": {
@mercuriete
mercuriete / php_syntax_check.sh
Created April 2, 2019 14:17
php recursive syntax check
#!/bin/bash
#search recursive and syntax check
find . -type f -name '*.php' -not -path "./vendor/*" -exec php -l {} \;
#!/bin/bash
# cat all access log
# take the url without query params (?param=value)
# group count and sort
zcat ssl_access.log.*.gz | cut -d'"' -f2 | cut -d' ' -f2 | cut -d'?' -f1 | sort | uniq -c | sort -g
@mercuriete
mercuriete / docker_update_all
Last active August 17, 2019 14:36
one line script for pull all docker images
#!/bin/bash
#pulls all docker images you have locally
docker images | tr -s ' ' | cut -d " " -f 1,2 | tr ' ' ':' | tail -n +2 | grep -v none | xargs -L1 docker pull
#!/bin/bash
# Please give credit to: https://gist.github.com/matthewmccullough/988077
# and to: https://gist.github.com/matthewmccullough/988077#gistcomment-2928496
# Go there and give a star there and not here.
# This is only a copy and paste for personal purposes
gitk --all $(git reflog --format=format:%h)
#!/bin/bash
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
set +e
bootanim=""
failcounter=0
timeout_in_sec=360
#!/bin/bash
# sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get autoclean
apt-get clean