This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Display PHP serialized values as table in edit. Using Jakub Vrana and Martin Zeman's JSON Adminer plugin (https://raw.githubusercontent.com/vrana/adminer/master/plugins/json-column.php) as a skeleton for this plugin. | |
* @link https://www.adminer.org/plugins/#use | |
* @author Don Wilson, https://pyxol.com/ | |
* @author Jakub Vrana, https://www.vrana.cz/ | |
* @author Martin Zeman (Zemistr), http://www.zemistr.eu/ | |
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) | |
*/ | |
class AdminerPHPSerializedColumn { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RedirectMatch 404 ^/\.git | |
RedirectMatch 404 ^/composer\.(json|lock|phar)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// zalgo text/scary text stripper | |
// https://stackoverflow.com/a/32921891/103337 | |
function strip_utf8_zalgo_text($string="") { | |
$string = preg_replace("~(?:[\p{M}]{1})([\p{M}])+?~uis", "", $string); | |
return $string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Blurred Background Image</title> | |
<style type="text/css"> | |
body { | |
overflow: hidden; | |
} | |
.blur_background_container { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CWD=$(pwd) | |
ARROW="-" | |
echo "" | |
echo "====================================" | |
echo "== Finding: $1" | |
echo "== - in: $CWD/" | |
echo "== - skipping paths that match '_old/|CST$'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_repo { | |
local repo_path=$(git rev-parse --show-toplevel 2>/dev/null) | |
[[ ! -z "$repo_path" ]] && basename $repo_path | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# General Program Installations # | |
################################# | |
yum -y install htop screen bzip2 unzip parallel wget nano dos2unix nmap iotop | |
########################### | |
# Install Git from Source # | |
########################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://bashrcgenerator.com | |
export PS1="\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]\[\033[38;5;249m\]@\[$(tput sgr0)\]\[\033[38;5;51m\]\h\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]\[\033[38;5;245m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# Backup Script | |
### | |
# Toggle debug mode for CLI output - "YES" or "NO" | |
DEBUG="YES" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Extract out first X sentences from uncleaned raw text | |
* @param string $text Raw text | |
* @param int $num_sentences Optional. Number of sentences | |
* @return string | |
*/ | |
function extract_sentences_from_text($raw_text, $num_sentences=3) { | |
$text = $raw_text; | |
$text = strip_tags($text); |
NewerOlder