This file contains 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
/*人人网*/ | |
#fortune, | |
#notice_system, | |
.today-topic, | |
#friends-panel > div:nth-child(1), | |
#dressupHomeBtn, | |
.app-title:nth-child(3), | |
.advert-main,.wide-sponsors,.sponsors,.sales-poll, /*广告系列*/ | |
.web-function, | |
#rightapp_side_div, |
This file contains 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
#include <iostream> | |
#include <Shlwapi.h> | |
#include <Shlobj.h> | |
#include <Tlhelp32.h> | |
#include <Pathcch.h> | |
#pragma comment(lib, "Shlwapi.lib") | |
#pragma comment(lib, "Pathcch.lib") | |
#define SHORT_NAME 32 |
This file contains 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
-- (p - 1) / (t + 2)^1.5 | |
CREATE FUNCTION SP_POINTS(P SMALLINT(5), CREATED TIMESTAMP) | |
RETURNS TINYINT(3) | |
RETURN (P - 1) / POW(TIMESTAMPDIFF(HOUR, CREATED, NOW()) + 2, 1.5); |
This file contains 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
/* | |
List all ip addresses in query result of Shodanhq.com | |
*/ | |
(function() { | |
var a = [], b = document.querySelectorAll('.ip'); | |
for(var i=0; i<b.length; i++) { | |
a.push(b[i].innerText) | |
} | |
console.log(a) |
This file contains 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() { | |
var os = require('os'), interfaces = os.networkInterfaces(), | |
ipFilter = function(addr) { | |
// no need to match 169.254.0.0/16 | |
return !addr.internal && | |
(addr.family === 'IPv4' && addr.address.match(/^(192|172|10)\./)) || | |
(addr.family === 'IPv6' && addr.address.match(/^f(c0|e8)0:/) || addr.address.match(/^::1{0,1}$/)); | |
}; | |
for (var i in interfaces) { |
This file contains 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 numpy as np | |
from scipy.sparse import csc_matrix | |
def pageRank(G, s = .85, maxerr = .001): | |
""" | |
Computes the pagerank for each of the n states. | |
Used in webpage ranking and text summarization using unweighted | |
or weighted transitions respectively. |
This file contains 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 zipfile, sys, os, re, urllib2, tempfile | |
BASE_DIR = 'example/static/' | |
FONT_DIR = os.path.join(BASE_DIR, 'fonts') | |
CSS_DIR = os.path.join(BASE_DIR, 'css') | |
def usage(): | |
print "Invalid param." | |
print "Usage: %s iconfont.zip" % sys.argv[0] |
This file contains 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
cat nmap-service-probes|\ | |
grep -o ' p\/[A-Za-z 0-9]*\/'|\ | |
sort|\ | |
uniq -ic|\ | |
sed "s/\/$//"|sed "s/^ p\///" |
This file contains 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
curl -XPOST 'http://localhost:9200/_search?pretty' -d ' | |
{ | |
"size": 1, | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
} | |
} | |
}, |
This file contains 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
<h3>Inside the form:</h3> | |
<form id="contact_form" method="post"> | |
<label>Name:</label> | |
<input type="text" id="name" name="name" value="John" /> | |
<br> | |
<label>Email:</label> | |
<input type="email" id="email" name="email" value="[email protected]" /> | |
<br> | |
<input type="submit" id="submit1" value="SEND" /> |
OlderNewer