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
# https://baraktawily.blogspot.fr/2018/02/how-to-dos-29-of-world-wide-websites.html | |
# https://wpvulndb.com/vulnerabilities/9021 | |
location ~* ^/wp-admin/load-scripts\.php$ { | |
if ( $query_string ~* "^.{1024,}$" ) { | |
return 444; | |
} | |
} |
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 insertScript(path) { | |
var script = document.createElement('script') | |
script.src = chrome.extension.getURL(path) | |
document.body.appendChild(script) | |
} | |
// insert patch sdk | |
insertScript('patch.js') | |
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 com.netflix.curator.framework.CuratorFramework; | |
import com.netflix.curator.framework.CuratorFrameworkFactory; | |
import com.netflix.curator.framework.api.BackgroundCallback; | |
import com.netflix.curator.framework.api.CuratorEvent; | |
import com.netflix.curator.retry.ExponentialBackoffRetry; | |
/** | |
* @author yl | |
* @date 2013-02-19 | |
*/ |
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 com.netflix.curator.framework.CuratorFramework; | |
import com.netflix.curator.framework.CuratorFrameworkFactory; | |
import com.netflix.curator.framework.recipes.cache.ChildData; | |
import com.netflix.curator.framework.recipes.cache.NodeCache; | |
import com.netflix.curator.framework.recipes.cache.NodeCacheListener; | |
import com.netflix.curator.retry.ExponentialBackoffRetry; | |
/** | |
* @author yl | |
* @date 2013-02-19 |
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 java.net.InetSocketAddress; | |
import java.net.SocketAddress; | |
import java.nio.charset.Charset; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.FutureTask; | |
import org.jboss.netty.bootstrap.ClientBootstrap; | |
import org.jboss.netty.bootstrap.ServerBootstrap; |
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
(comment You will want just about everything in your hive/lib dir included in your Classpath) | |
(ns myproj.core | |
(:import [org.apache.hadoop.hive.service HiveClient] | |
[org.apache.thrift.transport TSocket] | |
[org.apache.thrift.protocol TBinaryProtocol])) | |
(defn send-hive | |
"Creates a new socket and Hive client connection, runs the query, pulls the result, and closes the connection. | |
Eventually modify to split and parse according to schema of result. |
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
(comment Add [org.clojure/java.jdbc "0.1.1"] to project dependencies) | |
(ns myproject.core | |
(:use [clojure.java.jdbc :only [with-connection, with-query-results]])) | |
(let [db-host "MyHost" | |
db-port 10000 | |
db-name "default"] | |
(def db {:classname "org.apache.hadoop.hive.jdbc.HiveDriver" ; must be in classpath | |
:subname (str "//" db-host ":" db-port "/" db-name) |
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
package org.apache.http.examples.client; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.client.methods.HttpPost; |
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 com.petebevin.markdown.MarkdownProcessor | |
import org.xhtmlrenderer.pdf.ITextRenderer | |
import org.ccil.cowan.tagsoup.Parser | |
import org.apache.xalan.xsltc.trax.SAX2DOM | |
import org.xml.sax.InputSource | |
buildscript{ | |
repositories { | |
mavenCentral() | |
mavenRepo urls: "http://scala-tools.org/repo-releases" |
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
// gradle-build that uses meikel brandmeyers clojure-plugin for gradle (clojuresque) | |
// see http://bitbucket.org/kotarak/clojuresque | |
// use a standard maven directory-layout -> /src/main/clojure, /src/main/webapp | |
apply plugin: 'clojure' | |
apply plugin: 'war' | |
apply plugin: 'project-report' | |
warnOnReflection = false | |
aotCompile = true // needed for gen-class in servlet.clj |
NewerOlder