CSS Only Playground
Sidenav, Carousel, Accordion, Modal and Tooltips without the need of JavaScript (progressively enhanceable).
#!/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/ |
// 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) { |
<?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 |
<?php | |
// no direct access | |
defined('_JEXEC') or die('Restricted access'); | |
// Frontpage Check | |
$app = JFactory::getApplication(); | |
$menu = $app->getMenu(); | |
if ($menu->getActive() == $menu->getDefault()) { | |
$isFrontpage = true; |
<?php | |
// no direct access | |
defined('_JEXEC') or die('Restricted access'); | |
// === How to access Joomla plugin parameters anywhere in Joomla === | |
// Get plugin with name 'plugin_name' of type 'plugin_type' (e.g. "content") | |
$plugin = JPluginHelper::getPlugin('plugin_type', 'plugin_name'); |
#!/bin/bash | |
# Memcached (service & related PHP modules) installation on cPanel/WHM servers | |
# | |
# by Fotis Evangelou (Engintron) | |
# | |
# Updated: May 2018 | |
# | |
# USAGE: | |
# Upload this file at the root (/) folder of your cPanel/WHM server (on CentOS 7) |
/** | |
* Annoying.js - How to be an asshole to your users | |
* | |
* DO NOT EVER, EVER USE THIS. | |
* | |
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
* Visit https://gist.github.com/767982 for more information and changelogs. | |
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
* |
<?php | |
echo "Downloading...\n"; | |
copy("http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip","/tmp/GeoIPCountryCSV.zip"); | |
$f=fopen('zip:///tmp/GeoIPCountryCSV.zip#GeoIPCountryWhois.csv','r'); | |
echo "Generating"; | |
$data=NULL; |
Send an email to 1d@gleym.com to receive a reminder in one day, you'll get an echo of your original email. | |
Legend: d=day, h=hour, w=week, m=month | |
Examples: | |
2d@gleym.com=2 days | |
1h@gleym.com=1 hour | |
4d1h@gleym.com=4 days and 1hour | |
72h@gleym.com=72 hours |