This file contains hidden or 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
# kill multiple processes using keyword | |
kill -9 `ps -ef | grep keyword | grep -v grep | awk '{print $2}'` | |
# upgrade everything on debian | |
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y autoremove | |
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get -y autoremove | |
# viewing a user's ulimit's on debian (check /etc/security/limits.conf and /etc/pam.d/su) | |
su mysql -s /bin/sh -c "ulimit -a" | |
This file contains hidden or 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 | |
/** | |
* Template Name: worker | |
*/ | |
$args = array( | |
'posts_per_page'=> '-1', | |
'post_type'=> 'post', | |
'post_status' => array('publish'), | |
'order' => 'ASC', |
This file contains hidden or 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
global | |
log 127.0.0.1 local0 notice | |
chroot /var/lib/haproxy | |
user haproxy | |
group haproxy | |
# daemon | |
defaults | |
log global | |
# mode http |
This file contains hidden or 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
SetEnvIf Request_URI "\.gif$|\.jpg$|\.js$|\.css$|\.ico$|\.png$|\.ttf$|\.woff$|\.eot$|\.svg$|\.jpeg$|\.txt$" is_static | |
CustomLog /var/yourlogs/apache.access_log combined env=!is_static |
This file contains hidden or 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
// paste | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// wait and paste | |
jQuery.noConflict(); | |
// each paste will print the list on console, copy and paste + remove unnecessary lines | |
var a = jQuery('#browse_content li a'); |
This file contains hidden or 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
alias exim_summary="exim -bp | exiqsumm" | |
alias exim_log="tail -f /var/log/exim4/mainlog" | |
alias exim_force_send="exiqgrep -i | xargs exim -M" | |
alias exim_force_send_frozen="exiqgrep -zi | xargs exim -M" | |
# delete messages from the mail queue by receiver email address | |
exim -bp|grep "[email protected]"| awk {'print $3'}| xargs exim -Mrm |
This file contains hidden or 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
mkdir $(seq -f '%02.0f' 1 12) | |
creates folders: | |
01 02 03 04 05 06 07 08 09 10 11 12 |
This file contains hidden or 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 | |
/** | |
* Template Name: Attachment Fixing Utility | |
*/ | |
?> | |
<html> | |
<head> | |
<title>Wordpress Attachments Fixing Utility</title> | |
<style> |
This file contains hidden or 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
SELECT | |
CONCAT( | |
'ALTER TABLE ', | |
TABLE_SCHEMA, | |
'.', | |
TABLE_NAME, | |
' ENGINE = MyISAM;' | |
) | |
FROM | |
information_schema. TABLES |
This file contains hidden or 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
# find all files forward this directory and set 644 | |
sudo find . -type f -exec chmod 644 {} + | |
# find all directories forward and set 755 | |
sudo find . -type d -exec chmod 755 {} + |
OlderNewer