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 id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
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 | |
function getService() | |
{ | |
// Creates and returns the Analytics service object. | |
// Load the Google API PHP Client Library. | |
require_once 'google-api-php-client/src/Google/autoload.php'; | |
// Create and configure a new client object. |
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
#!/bin/bash | |
## | |
# MySQL DB dump to Git commit | |
# | |
# Dumps the specified mysql database to the given location and commits it and | |
# the previous database to the Git repository. | |
# | |
# It is assumed you have already setup the Git respository to only be the | |
# a checkout of the database backup location |
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
Hi FakhrXuXXXXX, | |
You may have received an email from us today regarding an Intercom free trial. We made a mistake which caused it to send to the wrong audience. | |
There's nothing wrong with Intercom; this was human error. Mine, in fact. disappointed I'm really sorry about that. | |
RuairXXXí |
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
Kvm | |
=== | |
Enable kvm virt acceleration for Android Virtual Device emulator | |
Open Terminal window and type: | |
- su -c "dnf install @virtualization" | |
- su -c "systemctl start libvirtd" | |
Verify that the kvm kernel modules were properly loaded |
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
- download f.lux for Linux from https://justgetflux.com/linux.html | |
- extract it on a folder | |
- digit these commands on a Terminal window: | |
$mv [YOUR FOLDER]/xflux /home/<user>/.local/bin/ | |
$chmod 755 /home/<user>/.local/bin/xflux | |
Now you can run flux with xflux command. | |
But you have to define your zipcode or latitude. | |
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
I was able to do about 4K concurrent connections with this setup. | |
Using Centos 6.7 64bit Apache httpd-2.2.15-47.el6.centos.x86_64 | |
a Virtual Machine 4x CPU’s and 4GBs of memory, I have 2 disks, one for /var and other for the rest. | |
Important to understand, this apache servers only one static image we use for the BI team. | |
It does recieve and log a huge cookie and sends a 43 byte 1×1.gif image. | |
Atention: It may not work right for dynamic web servers, as I use the mod_cache. | |
The impressive thing, it uses almos no CPU and memory is doing fine. | |
I did my benchmark using ab (apache benchmark) with 2 remote server in the sam LAN. | |
They key thing is to make a change and test it. | |
Some kernel tuning for the network |
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
Extended Binary Hardening | |
======================================================== | |
chmod 700 /usr/bin/wget | |
chmod 700 /usr/bin/lynx | |
chmod 700 /usr/bin/bcc | |
chmod 700 /usr/bin/byacc | |
chmod 700 /usr/bin/cc | |
chmod 700 /usr/bin/gcc | |
chmod 700 /usr/bin/i386-redhat-linux-gcc |