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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<!-- jQuery Required Library --> | |
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css"> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.x-git.min.js"></script> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script> | |
<!-- Our CDN Hosted Script --> | |
<script type="text/javascript" src="https://sitecolo.github.io/knowledgebasehub/web/web-en.js"></script> |
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
function getDescription($keyword){ | |
$url='http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryString='.urlencode($keyword).'&MaxHits=1'; | |
$xml=simplexml_load_file($url); | |
return $xml->Result->Description; | |
} | |
echo getDescription('agra'); |
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
# Building convolutional network | |
network = input_data(shape=[None, 28, 28, 1], name='input') | |
network = conv_2d(network, 32, 3, activation='relu', regularizer="L2") | |
network = max_pool_2d(network, 2) | |
network = local_response_normalization(network) | |
network = conv_2d(network, 64, 3, activation='relu', regularizer="L2") | |
network = max_pool_2d(network, 2) | |
network = local_response_normalization(network) | |
network = fully_connected(network, 128, activation='tanh') | |
network = dropout(network, 0.8) |
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 | |
//check if form was sent | |
if($_POST){ | |
$to = '[email protected]'; | |
$subject = 'Testing HoneyPot'; | |
$header = "From: $name <$name>"; | |
$name = $_POST['name']; |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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 | |
/** | |
* Send a Message to a Slack Channel. | |
* | |
* In order to get the API Token visit: | |
* | |
* 1.) Create an APP -> https://api.slack.com/apps/ | |
* 2.) See menu entry "Install App" | |
* 3.) Use the "Bot User OAuth Token" |
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
var run = 0; | |
var mails = {} | |
total = 3000; //滚动次数,可以自己根据情况定义 | |
function getEmails (cont) { | |
var friendbutton=cont.getElementsByClassName("_ohe"); | |
for(var i=0; i<friendbutton.length; i++) { | |
var link = friendbutton[i].getAttribute("href"); | |
if(link && link.substr(0,25)=="https://www.facebook.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
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
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 | |
class FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* | |
* Updating Objects | |
* | |
* When an action is published, or a Like button pointing to the object clicked, | |
* Facebook will 'scrape' the HTML page of the object and read the meta 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 | |
/* | |
Plugin Name: Force SSL URL Scheme | |
Plugin URI: https://gist.github.com/webaware/4688802 | |
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work | |
Version: 1.0.0 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
@ref: http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility |