Skip to content

Instantly share code, notes, and snippets.

@johnny13
johnny13 / linux-tools.sh
Created April 2, 2021 13:38 — forked from AnnoyingTechnology/linux-tools.sh
Linux server basic tools installation
apt install -y apt install rsync nload htop iotop lynx curl
lm-sensors screen ncdu jq lbzip2 pigz unzip s-tui ethtool build-essential
smartmontool hddtemp lmsensor
# for stretch
# python-pip
# pip install s-tui
@frank-bg
frank-bg / 01-lamp.sh
Last active January 20, 2021 02:10
lamp installation based on homestead settler
#!/usr/bin/env bash
function isRoot() {
if [ "$EUID" -ne 0 ]; then
return 1
fi
}
if ! isRoot; then
echo "Sorry, you need to run this as root"
@AnnoyingTechnology
AnnoyingTechnology / linux-tools.sh
Last active April 2, 2021 13:38
Linux server basic tools installation
apt install -y apt install rsync nload htop iotop lynx curl
lm-sensors screen ncdu jq lbzip2 pigz unzip s-tui ethtool build-essential
smartmontool hddtemp lmsensor
# for stretch
# python-pip
# pip install s-tui
@petertoi
petertoi / nginx-wp-rewrite-uploads.conf
Last active January 18, 2018 21:14
Nginx rewrite to request WordPress uploads from external domain
location ~ ^/wp-content/uploads/(.*) {
if (!-f $request_filename) {
rewrite ^/wp-content/uploads/(.*)$ http://EXTERNAL_URL/wp-content/uploads/$1 redirect;
}
}
@intermundos
intermundos / get-server.php
Created September 29, 2017 21:59
Display SERVER info WP
<?php
$indicesServer = array('PHP_SELF',
'argv',
'argc',
'GATEWAY_INTERFACE',
'SERVER_ADDR',
'SERVER_NAME',
'SERVER_SOFTWARE',
'SERVER_PROTOCOL',
@mshick
mshick / install.sh
Last active April 2, 2020 10:01
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
@ifamily
ifamily / wp-config.php
Last active January 8, 2024 05:06
A universal WordPress wp-config.php which works on local development to staging and production server environments.
<?php
/*
One wp-config for local development to staging to production.
*/
// Define Environments
$environments = array(
#! /usr/bin/python
import Image
#_______________________________________________________load image/create 'canvas'
source = Image.open("test26.jpg")
img = source.load()
print source.format
#! /usr/bin/python
import Image
#Created by vvdr12
#Fully open license. Have fun.
#change threshold value in 'def contrastpoints' for higher/lower line density.
#put a 'test.jpg' file in the same folder as the code.
#_functions______________________________________________
@wpsmith
wpsmith / test-short.php
Last active January 12, 2018 03:46
PHP: WordPress test page
<?php
date_default_timezone_set( 'America/New_York' );
// Load the WordPress Environment
define( 'WP_DEBUG', true ); /* uncomment for debug mode */
require('./wp-load.php');
// User functions
//require('./wp-admin/includes/user.php');
// Debugging