Skip to content

Instantly share code, notes, and snippets.

@rokclimb15
rokclimb15 / test-solr.py
Created March 22, 2020 15:55
Test Solr Indexer
#import os
#os.environ["DEBUG_PYSOLR"] = "1"
import pysolr
import uuid
from faker import Faker
zookeeper = pysolr.ZooKeeper("localhost:2181")
solr = pysolr.SolrCloud(zookeeper, "staging")

Keybase proof

I hereby claim:

  • I am rokclimb15 on github.
  • I am brianmorton (https://keybase.io/brianmorton) on keybase.
  • I have a public key whose fingerprint is 116F E53E A3CE D613 475F 78A4 33CC FD8E CC5D 9C0D

To claim this, I am signing this object:

@rokclimb15
rokclimb15 / test-php-mysql-ssl.php
Created September 5, 2016 18:26
Test speed of unencrypted vs encrypted MySQL connection from PHP
<?php
$time_start_unencrypted_conn = microtime(true);
$link_unencrypted = mysql_connect(
"hostname",
"root",
"",
true
);
$time_end_unencrypted_conn = microtime(true);
@rokclimb15
rokclimb15 / gist:e6c34e04dc969a3ba0f9
Created July 10, 2015 14:04
Sample upload file to DVIDS API
from form_post import encode_multipart_formdata
import httplib, json, mimetypes
DVIDS_API_SECRET = ''
def post_to_dvids(my_unit_id, path_to_asset):
response_data = {}
access_token = get_token(request)
if not access_token:
tokens = refresh_tokens(request)