Skip to content

Instantly share code, notes, and snippets.

Jason Whitehorn jwhitehorn

Block or report user

Report or block jwhitehorn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
input = numpy.array([data[0] for data in input_data])
mf = cl.mem_flags
temp = cl.Buffer(self.opencl_context, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=input)
a_g = temp
work_size = len(input_data)
res = None
opencl_context = cl.create_some_context()
opencl_queue = cl.CommandQueue(opencl_context)
opencl_kernel = open('./opencl/', 'r').read()
opencl_program = cl.Program(self.opencl_context, opencl_kernel).build()
inline double sigmoid(double z){return 1.0/(1.0+exp(-1.0 * z));} //
void multiply(__global const long *params, __global const double *as, __global const double *b, __global double *cs){
int gid = get_global_id(0);
//row major
int M = params[2];
View engine.js
this.tryHash = function(midstate, half, data, hash1, target, nonce){
data[3] = nonce;
var h0 = this.sha.update(midstate, data).state; // compute first hash
for (var i = 0; i < 8; i++) hash1[i] = h0[i]; // place it in the h1 holder
this.sha.reset(); // reset to initial state
var h = this.sha.update(hash1).state; // compute final hash
if (h[7] == 0) {
var ret = [];
View engine.js
this.handleGetWorkResponse = function(response){
var work = eval("(" + response + ")");
var midstate = jsMiner.Util.fromPoolString(work.midstate);
var half =, 128);
var data =, 256);
data = jsMiner.Util.fromPoolString(data);
half = jsMiner.Util.fromPoolString(half);
var hash1 = jsMiner.Util.fromPoolString(work.hash1);
var target = jsMiner.Util.fromPoolString(;
View nginx.conf
proxy_set_header X-SSL-Client-Cert $ssl_client_raw_cert;
View jason_whitehorn_us.conf
location = /wp-login.php {
if ($ssl_client_verify != SUCCESS) {
return 403;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
View server.conf
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/;
ssl_certificate_key /etc/nginx/;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
View jason_whitehorn_us.conf
limit_req_zone $binary_remote_addr zone=jason_whitehorn_us:5m rate=5r/m;
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_client_certificate /etc/nginx/whitehorn-ca.crt;
ssl_certificate /etc/nginx/;
ssl_certificate_key /etc/nginx/;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
View contents.json
"url": "",
"file": "html/chapter2.xhtml",
"login": {
"username": "user",
"password": "secret!",
"action": "/login/"
You can’t perform that action at this time.