Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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 | |
// Extraction utility for getting attributes from HTML tag. | |
function extract_html_atts( $string, $prefix = "data-" ) { | |
$start = 0; | |
$end = 0; | |
while( strpos( $string, $prefix, $end ) ) { | |
$start = strpos( $string, $prefix, $start )+strlen( $prefix ); | |
$end = strpos( $string, '"', $start )-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
// ==UserScript== | |
// @name Linkvertise Bypass | |
// @namespace https://github.com/nima-rahbar/ | |
// @version 1.0 | |
// @description Bypass links that cannot be bypassed by Universal Bypass | |
// @author Nima Rahbar | |
// @match *://*.linkvertise.com/* | |
// @match *://*.linkvertise.net/* | |
// @match *://*.link-to.net/* | |
// @icon https://nimarahbar.com/wp-content/uploads/2017/07/favicon.png |
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
http://www.youtube.com/watch?v=-wtIMTCHWuI | |
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1 | |
http://youtu.be/-wtIMTCHWuI | |
http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-wtIMTCHWuI&format=json | |
http://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DEhxJLojIE_o%26feature%3Dshare |
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 | |
$filters = "1,2,4,(5,6,7),8;9"; | |
var_dump(preg_split("~[,|;](?![^(]*\\))~", $filters)); | |
/* | |
array (size=6) | |
0 => string '1' (length=1) | |
1 => string '2' (length=1) | |
2 => string '4' (length=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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
import csv, time | |
import os.path | |
browser = webdriver.Chrome() | |
for year in range(2013, 2020): | |
for month in range(1,13): |
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 | |
// https://stackoverflow.com/questions/23062537/how-to-convert-html-to-json-using-php | |
function html_to_obj( $html ) { | |
$dom = new DOMDocument(); | |
$dom->loadHTML( $html ); | |
return element_to_obj( $dom->documentElement ); | |
} | |
function element_to_obj( $element ) { |
This file has been truncated, but you can view the full file.
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
{ | |
"log": { | |
"comment": "", | |
"creator": { | |
"comment": "", | |
"name": "BrowserMob Proxy", | |
"version": "2.1.4" | |
}, | |
"entries": [ | |
{ |
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 | |
// List of tags to be replaced and their replacement | |
$replace_tags = [ | |
'i' => 'em', | |
'b' => 'strong' | |
]; | |
// List of tags to be stripped. Text and children tags will be preserved. | |
$remove_tags = [ |
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 multiple_download(array $urls, $save_path = '/tmp') | |
{ | |
$multi_handle = curl_multi_init(); | |
$file_pointers = []; | |
$curl_handles = []; | |
// Add curl multi handles, one per file we don't already have | |
foreach ($urls as $key => $url) { |
NewerOlder