Skip to content

Instantly share code, notes, and snippets.

Fotis Evangelou fevangelou

Block or report user

Report or block fevangelou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fevangelou
fevangelou / bootstrap_fedora.sh
Last active Nov 8, 2019
New Fedora Workstation Preparation
View bootstrap_fedora.sh
#!/bin/bash
# ~ Setup a newly installed PC with Fedora Workstation 31 ~
# ~ Updated Nov 2019 ~
# Update the system
sudo dnf -y update
# Common Packages
sudo dnf install -y dnf-plugin-system-upgrade fedora-workstation-repositories
@fevangelou
fevangelou / database.sh
Created Sep 4, 2019
Frequent MySQL/MariaDB operations
View database.sh
MySQL Operations
--------------------------------------
In this document:
- Export/Import DB
- Export/Import Table from DB
- mysqladmin
- Repair DB
--------------------------------------
@fevangelou
fevangelou / display_song.html
Created Jul 1, 2019
RadioWave - Live song name from streaming server
View display_song.html
<div>Now playing: <span id="currentlyPlaying">[song info loading...]</span></div>
<script>
var url = '/path/to/get_songs.php';
function updateTitle() {
fetch(url)
.then((resp) => resp.json())
.then(function(data) {
if (data.length) {
var name = data[0].name;
document.getElementById('currentlyPlaying').innerHTML = name;
@fevangelou
fevangelou / install_elasticsearch_in_centos.sh
Last active Nov 2, 2019
Install ElasticSearch with the Cerebro UI on CentOS 6 & 7 (with or without cPanel)
View install_elasticsearch_in_centos.sh
#!/bin/bash
# /**
# * @version 1.0
# * @package Install ElasticSearch with the Cerebro UI on CentOS 6 & 7 (with or without cPanel)
# * @author Fotis Evangelou (https://kodeka.io)
# * @url https://engintron.com
# * @copyright Copyright (c) 2018 - 2019 Kodeka OÜ. All rights reserved.
# * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
# */
@fevangelou
fevangelou / bootstrap.sh
Last active Apr 16, 2019
ClearLinux Desktop Preparation
View bootstrap.sh
#!/bin/bash
sudo swupd check-update
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
#sudo hostnamectl set-hostname fe-thinkpad-x240
sudo swupd bundle-add desktop-apps-extras desktop-assets desktop-lxqt fonttools libreoffice wget
@fevangelou
fevangelou / bootstrap.sh
Last active Sep 24, 2019
New Ubuntu Desktop 18.04 Preparation
View bootstrap.sh
#!/bin/bash
# Short URL: https://git.io/fjY3J
#
# How to use:
# $ cd ~/Downloads
# $ wget -O bootstrap.sh https://git.io/fjY3J
# $ chmod +x bootstrap.sh
# $ sudo ./bootstrap.sh
#
@fevangelou
fevangelou / install_sis_graphics_on_linux.sh
Last active Sep 24, 2019
Bash script to install SiS Mirage 3+ graphics drivers on Linux
View install_sis_graphics_on_linux.sh
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
@fevangelou
fevangelou / install_nano_v4.0_on_mac.sh
Created Mar 24, 2019
Install Nano Editor v4.0 (with syntax highlighting) on the Mac
View install_nano_v4.0_on_mac.sh
#!/bin/bash
# Install Nano Editor (https://www.nano-editor.org) with syntax highlighting on the Mac
# Version 4.0 ("Thy Rope of Sands") released March 24th 2019
cd ~/
wget https://www.nano-editor.org/dist/v4/nano-4.0.tar.gz
tar -xvf nano-4.0.tar.gz
mv nano-4.0 .nano
cd .nano/
@fevangelou
fevangelou / index.desktop_or_mobile.php
Created Dec 18, 2018
Code to utilize different sub-templates for desktop and mobile in Joomla. Usage: Add right after the opening <html> tag
View index.desktop_or_mobile.php
// Desktop to Mobile redirect and vise-versa
// Usage: Add right after the opening <html> tag
// For the desktop template:
<!-- Browser detect and redirect -->
<script type="text/javascript">
(function() {
// Get URL query strings
function getQS(v) {
@fevangelou
fevangelou / timestamp_for_joomla_css_js.php
Last active Nov 4, 2018
Enforce a timestamp on all CSS/JS files attached in a Joomla template
View timestamp_for_joomla_css_js.php
<?php
defined('_JEXEC') or die;
/* --- Add this at the very top of index.php (but right below the "defined..." line) to control the timestamp --- */
// Set a timestamp for CSS/JS files
if (isset($_GET['nocache'])) {
// Timestamp for testing
// When ?nocache is appended in a URL, enforce a timestamp of up to the current second
// so the CSS and JS files are re-fetched by the browser, even behind a CDN
You can’t perform that action at this time.