Skip to content

Instantly share code, notes, and snippets.

<summary class="header__menu-item list-menu__item link focus-inset">
<a href="{{ link.url }}" style="color: inherit;{% unless link.child_active or link.active %}text-decoration:inherit{% endunless %}"><span {%- if link.child_active %} class="header__active-menu-item"{% endif %}>{{ link.title | escape }}</span>
{% render 'icon-caret' %}</a>
</summary>
<script>
let items = document.querySelector(".header__inline-menu").querySelectorAll("details");
items.forEach(item => {
item.addEventListener("mouseover", () => {
item.setAttribute("open", true);
.z-row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: var(--gutter-x2);
margin-left: var(--gutter-x2);
}
.z-no-gutters {
.box-deg {
background: #eee;
height: 100px;
width: 100%;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.box-deg::after {
titleCase(string) {
let sentence = string.toLowerCase().split(" ");
for(var i = 0; i<sentence.length; i++){
sentence[i] = sentence[i][0].toUpperCase() + sentence[i].slice(1);
}
return sentence.join(" ");
}
function getLastDay($month){
// Given a date in string format
$datestring = $month;
// Converting string to date
$date = strtotime($datestring);
// Last date of current month.
$lastdate = strtotime(date("Y-m-t", $date));
function parseUsername(string $url): string
{
$output = $url;
// Parse username
preg_match('/(?:https?:\/\/)?(?:www.)?(?:twitter|medium|facebook|vimeo|instagram)(?:.com\/)?([@a-zA-Z0-9-_]+)/im', $url, $matches);
// Set output
$output = count($matches) ? $matches[1] : $output;
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
ls /var/cpanel/users | xargs -n1 /scripts/suspendacct
reinstalling roundcube
rpm -e --nodeps cpanel-roundcubemail
/usr/local/cpanel/scripts/check_cpanel_rpms --fix
rsync -Pvaze "ssh" /home/username/* root@host:/home/username/