Skip to content

Instantly share code, notes, and snippets.

View w6cloud's full-sized avatar
😁
Building our new platform!

Pierre Aboucaya w6cloud

😁
Building our new platform!
View GitHub Profile
@w6cloud
w6cloud / plesk-utilities.md
Last active May 3, 2019 21:18
Plesk utilities

Plesk utilities

A tiny list of Plesk tips that we find useful. Most part of the shell commands muste be entered as root.

Emails

List of mailbox passwords

@w6cloud
w6cloud / site-archiver.sh
Created May 8, 2019 02:33
Download website using wget
#!/bin/bash
##################################################
#
# DOWNLOAD WEBSITE LOCALLY USING WGET
#
# Usage: ./site-archiver.sh https://web6.fr/
#
##################################################
@w6cloud
w6cloud / create-thumbnails.sh
Created October 22, 2019 15:56
Creates square thumbnails from a list of jpgs
#!/bin/bash
########################################################################
#
# Creates square thumbnails (100x100) from a folder of jpg images
#
########################################################################
for i in *.jpg; do
if [ "$i" -nt "../thumbs/$i" ]; then
@w6cloud
w6cloud / extract-video-thumbnail.sh
Created October 24, 2019 10:07
Extract image from video
#!/bin/bash
########################################################################
#
# Creates a thumbnail extracted from a video
#
########################################################################
ffmpeg -i VIDEO.mp4 -ss 00:00:05.000 -f image2 -vframes 1 VIDEO.png
@w6cloud
w6cloud / encode.sh
Last active November 5, 2019 15:20
Encode mp4 videos contained in a folder to OGG, WEBM, MP4
#!/bin/bash
# Based on https://gist.github.com/yellowled/1439610 & https://github.com/chuyskywalker/easy-web-video-encode/blob/master/encode.sh
CORES=$(grep -c ^processor /proc/cpuinfo)
if [ "$CORES" -gt "1" ]; then
CORES="$(($CORES - 1))"
fi
for filename in ./*.mp4; do
@w6cloud
w6cloud / useful.md
Last active November 11, 2019 16:41
Useful bash commands

Useful bash commands

List of commands I often need but never remember... When there are functions shortcuts, I usualy put ththe code ~/.bash_functions and source it in ~/.bash_rc to make it globally available.

Search

Search files contining specific text

Search recursively in the folder ./ for files containing the pattern text.

@w6cloud
w6cloud / yoast.md
Created April 15, 2020 18:30
Useful Yoast SEO tricks

Yoast SEO useful tricks

Get primary category

/**
 * Get the primary category
 * 
 * The first category is return as a fallback
 * 
@w6cloud
w6cloud / cloudflare-wp-page-rules.md
Last active May 7, 2020 20:16
CloudFlare page rules for WordPress
@w6cloud
w6cloud / useful-docker-commands.md
Created May 12, 2020 00:06
Useful Docker commands

Useful Docker commands

Instances

List all running instances

docker ps -a
@w6cloud
w6cloud / useful-docker-commands.md
Created May 12, 2020 00:06
Useful Docker commands

Useful Docker commands

Instances

List all running instances

docker ps -a