Skip to content

Instantly share code, notes, and snippets.

View VirtuBox's full-sized avatar
🏠
Working from home

VirtuBox VirtuBox

🏠
Working from home
View GitHub Profile
@VirtuBox
VirtuBox / wp-cli.md
Last active August 3, 2022 13:21
wp-cli install & useful packages

install wp-cli

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

download wp-cli bash_completion

@VirtuBox
VirtuBox / php-timecop.md
Created May 24, 2018 10:04
php-timecop
cd /etc/php/7.0/
mkdir dev
cd dev/
apt install php7.0-dev
git clone https://github.com/hnw/php-timecop.git
cd php-timecop
@VirtuBox
VirtuBox / speedtest.sh
Created May 24, 2018 00:41
speedtest.sh
#!/bin/bash
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
./speedtest-cli --share
@VirtuBox
VirtuBox / rewrite-route.conf
Created May 13, 2018 00:30
nginx rewrite rules for custom seo friendly url php script
location /
{
try_files $uri @url;
}
location ~ \.php$
{
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php7;
}
@VirtuBox
VirtuBox / wp-config.php
Last active May 14, 2018 16:18
Custom end of wp-config.php
/* Specify maximum number of Revisions. */
define( 'WP_POST_REVISIONS', '10' );
/* Trash Days. */
define( 'EMPTY_TRASH_DAYS', '15' );
/* PHP Memory */
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
define('WP_DEBUG', false);
@VirtuBox
VirtuBox / docker-compose.yml
Last active April 6, 2018 22:30
Gitlab-ce Docker Compose
postgresql:
restart: always
image: sameersbn/postgresql:9.6-2
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
volumes:
- /home/gitlab/postgresql:/var/lib/postgresql
gitlab:
@VirtuBox
VirtuBox / config.json
Last active March 25, 2018 00:24
xmrigCC configuration example for install script
{
"algo": "cryptonight",
"av": null,
"aesni": 0,
"threads": 0,
"multihash-factor": 0,
"multihash-thread-mask": null,
"background": false,
"colors": true,
"cpu-affinity": null,
@VirtuBox
VirtuBox / sources.list
Created March 1, 2018 13:21
Ubuntu 16.04 sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
###### Ubuntu Update Repos
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
@VirtuBox
VirtuBox / sources.list
Last active March 1, 2018 14:41
debian 8 Jessie - apt sources.list
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://ftp.fr.debian.org/debian/ oldstable main contrib non-free
deb http://ftp.fr.debian.org/debian/ oldstable-updates main contrib non-free
deb http://security.debian.org/ oldstable/updates main
@VirtuBox
VirtuBox / sshd_config
Created March 1, 2018 12:35
default sshd config ubuntu
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2