Skip to content

Instantly share code, notes, and snippets.

View mizansyed's full-sized avatar

Mizan Syed mizansyed

  • Cabinet Office and Brill Labs
  • United Kingdom
  • X @mizansyed
View GitHub Profile
###############################################################################################
# LAMP setup for Ubuntu 16.04 Server #
# Apache + PHP + Percona #
###############################################################################################
# Update and prepare server
apt update; apt -y upgrade
apt -y install nano sudo curl wget git dnsutils lynx
sudo hostname srv.zdb.bz
sudo service hostname start
@wkw
wkw / README.md
Last active April 5, 2024 08:26
WordPress functions to selectively disable WPEngine site caching temporarily.

Controlled WPEngine Cache Busting

This technique was used to control WPEngine's caching by making WPE think there was a WordPress CMS user logged in by setting a fake cookie.

This code was developed to display site-wide dynamic content when a user authenticated against an external (non-WordPress) service.

N.B.: this worked as of 10/2015, but WPE may make infratructure changes which break the technique.

Usage

@Iman
Iman / clean.sh
Last active May 28, 2025 09:03
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">