Skip to content

Instantly share code, notes, and snippets.

View jessuppi's full-sized avatar
❤️
let the bodies hit the floor

Jesse Nickles jessuppi

❤️
let the bodies hit the floor
View GitHub Profile
@sheikhwaqas
sheikhwaqas / setup-mysql57-ubuntu16.sh
Created April 11, 2017 14:13
Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Download and Install the Latest Updates for the OS
apt update && apt upgrade -y
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
@JamiesonRoberts
JamiesonRoberts / header-overrides.php
Last active April 22, 2019 09:56
Wordpress 4.7.x Head Cleanup Script
<?php
/**
* Created by jamiesonroberts
* Date: 2017-04-08
*/
/**
* Removes security vulnerabilities, extraneous styles and scripts,
* as well as related resource inclusions for Wordpress 4.7.x
*
@attacus
attacus / riot-matrix-workshop.md
Last active April 8, 2025 08:18
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@squarestar
squarestar / install-wp-plugins.php
Last active December 1, 2024 00:09
Programmatically install and activate wordpress plugins
<?php
/**
* Programmatically install and activate wordpress plugins
*
* Usage:
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the
* plugins you want to install and activate
* 2. Upload this file to the wordpress root directory (the same directory that contains the
* 'wp-admin' directory).
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed
@hackedunit
hackedunit / install-redis.md
Last active September 5, 2024 12:22
Install and configure Redis on Ubuntu 16.04 with systemd
  1. Install pre-requisities

sudo apt-get install build-essential tcl

  1. Install Redis
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
@ryenus
ryenus / bashrc
Created February 15, 2017 02:29 — forked from theBull/bashrc
How to change cursor shape, color, and blinkrate of Linux Console
##############
# pretty prompt and font colors
##############
# alter the default colors to make them a bit prettier
echo -en "\e]P0000000" #black
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]P3D7AF87" #brown
echo -en "\e]P48787AF" #darkblue
@AustinGil
AustinGil / functions.php
Last active October 7, 2024 02:45
Only load scripts and styles if a specific shortcode is present in the content when the page/post is saved
/*
* This first function maps shortcodes to their respective resources,
* then checks whether those shortcodes exist in the content,
* then stores the required resource handles in a custom field.
* This way, we aren't running resource-intensive functions on every page load.
*/
function check_post_shortcodes($post_id) {
// Map conditional shortcodes to their respective resource handle
// Remember to manually dequeue resource handles below as well.
@eliranmal
eliranmal / show-ansi-colors.sh
Last active November 7, 2022 07:30
spits N ansi colors to the terminal
#!/usr/bin/env sh
usage() {
echo "show-ansi-colors <n>"
exit 0
}
(( $# < 1 )) && usage
show_ansi_colors() {
@muhammadghazali
muhammadghazali / What is server_names_hash_bucket_size.md
Last active March 11, 2025 03:56
Nginx: What is server_names_hash_bucket_size?

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@ajskelton
ajskelton / WP Customizer - Radio Buttons
Last active December 7, 2022 04:48
Add a Radio field to the WordPress Customizer.
$wp_customize->add_setting( 'themeslug_radio_setting_id', array(
'capability' => 'edit_theme_options',
'default' => 'blue',
'sanitize_callback' => 'themeslug_customizer_sanitize_radio',
) );
$wp_customize->add_control( 'themeslug_radio_setting_id', array(
'type' => 'radio',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Radio Selection' ),