Skip to content

Instantly share code, notes, and snippets.

View generateChangelog.php
<?php
$output = "# changelog\n\n";
$previousTag = 0;
$gitTags = shell_exec("git tag --sort=-creatordate");
$gitTagsArray = explode("\n", $gitTags);
foreach ($gitTagsArray as $gitTag) {
@JBlond
JBlond / smb.conf
Created Dec 27, 2020
smb tuning Windows 10
View smb.conf
[global]
read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
protocol = SMB3
@JBlond
JBlond / install.bash
Created Aug 19, 2020
wordpress fast installation WP CLI
View install.bash
#!/bin/bash
wp core download
wp core config --dbhost=localhost --dbname=press --dbuser=press --dbpass=asasaasasasa --dbprefix=wp_
wp core install --url=example.com --title="Test Site" --admin_user=admin --admin_password=admin --admin_email=admin@example.com
wp core update
wp core update -db
wp plugin uninstall hello
wp theme install micro
wp theme activate micro
wp theme uninstall twentynineteen twentyseventeen twentytwenty
View uncide.php
<?php
class 🤘 {
const 😁 = '👽';
public function 🤡()
{
return self::😁;
}
}
View leapyear.php
<?php
function isLeapYear(int $year): bool
{
return $year % 4 == 0 && $year % 100 != 0 || $year % 400 == 0;
}
@JBlond
JBlond / openssl_configure.md
Last active Jun 26, 2020 — forked from steakknife/openssl_configure.md
OpenSSL configure options
View openssl_configure.md

OpenSSL Configure Options (1.1.1g)

Standard party line

Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...]
                 [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw]
                 [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm]
                 [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR]
                 [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity]
@JBlond
JBlond / hosts.txt
Created Jun 13, 2020 — forked from Luro02/hosts.txt
A blocklist for the Amazon Fire devices, that should block (some) telemetry...
View hosts.txt
# Amazon Fire (HD 8) Blocklist (V.1.0)
#
# Constribute:
# please make a comment under this gist and I'll add it after checking to this list.
#
# Constributions by:
# Luro02
#
# Credits:
# https://forum.xda-developers.com/amazon-fire/general/how-to-block-updates-via-router-t3640267
View generaterandomchanges
#!/bin/bash
#Ensure we have the quantity specified on the CLI
if [ -z "$3" ]; then ARG_ERR=ERR; fi
if [ -z "$2" ]; then ARG_ERR=ERR; fi
if [ -z "$1" ]; then ARG_ERR=ERR; fi
if [ -n "$ARG_ERR" ];
then
echo "Usage: <filecount> <filenamebase> <filenameextension>"
exit
View rebootlist.sh
#!/bin/bash
who -b
last reboot | less
last reboot | head -1
last -x|grep shutdown | head -1
@JBlond
JBlond / tailf-with-colors.sh
Last active Feb 12, 2021
Tail logs with color for Monolog
View tailf-with-colors.sh
tailf-with-colors () {
if [ -z "$1" ] ; then
echo "Please specify a file for monitoring"
return
fi
tail -f $1 | awk '
{matched=0}
/INFO:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE
/DEBUG:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE