Skip to content

Instantly share code, notes, and snippets.

View kerkenit's full-sized avatar

Kerk en IT kerkenit

View GitHub Profile
@kerkenit
kerkenit / install_php.sh
Last active May 27, 2024 15:20
Install multiple PHP version on Debian/Ubuntu with all modules and update system
#!/bin/bash
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php7.4 php7.4-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,apcu-bc,geoip,json,zip}
sudo apt install -y php8.0 php8.0-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo apt install -y php8.1 php8.1-{bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo
@kerkenit
kerkenit / update_pip.sh
Created May 30, 2022 14:16
Update all pip and pip3 packages
pip3 install --upgrade pip && pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U || pip install --upgrade pip && pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
@kerkenit
kerkenit / update.sh
Created February 19, 2022 11:37
Update RaspberryPi
sudo mount -o remount, rw /boot/ && sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo reboot
@kerkenit
kerkenit / libavutil56
Last active February 17, 2020 19:50
Install HomeKit Camera up to Debian Buster
cd /home/pi
sudo apt update
clear
sudo apt remove node nodejs nodejs-legacy -y
sudo apt remove libavcodec-extra-57 libavformat57 libavresample2 libavutil55 -y
clear
sudo apt autoremove -y
clear
if uname -m | grep -q "armv6l"; then
clear
@kerkenit
kerkenit / Import_into_GitHub.sh
Last active November 7, 2019 11:14
Add 150 times the last 250 files to GitHub
#!/bin/bash
for n in {1..150}; do tac .gitignore | sed "1,250d" | tac | tee .gitignore2 && mv .gitignore2 .gitignore && git add --all && git commit -m "Old checkin" && git push ; done
#!/bin/bash
# Compile and install (or install via Apt) FFmpeg Codecs
# Compile and install FFmpeg suite
echo "Begining Installation of FFmpeg Suite"
#Update APT Repository
echo "Updating the APT repository information"
apt-get update
@kerkenit
kerkenit / RefreshGoogleCalendar.js
Last active April 4, 2019 12:16 — forked from termi/crossBrowser_initKeyboardEvent.js
Go to today in Google Calendar
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
setInterval(function() {
getElementByXpath('//*[@id="gb"]/div[2]/div[2]/div[1]/div/div/div[1]/div/div[1]').click();
}, 100000);
@kerkenit
kerkenit / cputest.sh
Last active November 13, 2018 14:08
Test CPU
#!/bin/bash
# Detects which OS and if it is Linux then it will detect which Linux
# Distribution.
# -e option instructs bash to immediately exit if any command [1] has a non-zero exit status
# We do not want users to end up with a partially working install, so we exit the script
# instead of continuing the installation with something broken
set -e
# Find the rows and columns will default to 80x24 if it can not be detected
@kerkenit
kerkenit / PixelReset.css
Last active January 22, 2018 08:39
Reset the pixels of a screen to prevent burning in
#PixelReset {
position: absolute;
left:0;
top:0;
width: 100%;
min-height: 100%;
z-index: 2147483647;
background: linear-gradient(270deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
background-size: 1200% 1200%;
-webkit-animation: PixelReset 120s ease infinite;
@kerkenit
kerkenit / DetectBrowser.js
Created August 21, 2017 13:48
Detect browser
$(function () {
$.browser.chrome = $.browser.webkit && !!window.chrome;
$.browser.safari = $.browser.webkit && !window.chrome;
$.browser.firefox = $.browser.mozilla
$.browser.internetexplorer = window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0;
});