Skip to content

Instantly share code, notes, and snippets.

View kdoran's full-sized avatar

Kevin Doran kdoran

  • Billiam
  • Various
View GitHub Profile
@kdoran
kdoran / backup-dbs.sh
Last active January 14, 2019 22:00
backup all couchdbs except system dbs every 30 days
#!/bin/bash
TIMESTAMP=$(date +"%d")
BACKUP_DIR="./backups"
export $(cat .env)
COUCHDB=$COUCHDB_USER:[email protected]:5984
mkdir -p "$BACKUP_DIR"
dbs=`curl -X GET http://$COUCHDB/_all_dbs | grep -Po '[A-Za-z0-9_.]*'`
@kdoran
kdoran / Installing lightgbm on Ubuntu 16 Xenial with GPU Support.sh
Last active August 3, 2017 19:55
Installing lightgbm on Ubuntu 16 Xenial with GPU Support
sudo apt-get update
apt-get install -y python-pip nginx npm nodejs-legacy supervisor opencl-headers libboost-all-dev libboost-dev libboost-system-dev libboost-filesystem-dev ocl-icd-libopencl1 ocl-icd-opencl-dev git
apt-get install software-properties-common
add-apt-repository ppa:george-edison55/cmake-3.x
apt-get update
export BOOST_ROOT=/usr/include/boost
sudo apt-get install cmake
# this is where it gets ugly, tried: sudo add-apt-repository ppa:kylelutz/compute; sudo apt-get install boost-compute; with no dice.
# kept getting: boost/compute/core.hpp: No such file or directory
<html>
<head>
<title>Advanced</title>
<script type="text/javascript"
src="//sheridan.ugc.bazaarvoice.com/bvstaging/static/9516-en_au/bvapi.js">
</script>
<script type="text/javascript">
$BV.configure("global", {
submissionContainerUrl: "http://gavinhealy.com/bv/advanced.php?"
});
@kdoran
kdoran / gist:1903901
Created February 24, 2012 21:35
BV ui call in button
<a id="reviews_writeReview_btn" href="#" onclick="$BV.ui('rr', 'submit_review', {submissionUI: 'LIGHTBOX',
allowSamePageSubmission: true,
doLogin: function(callback, success_url) {
window.location = 'http://www-dev.golfsmith.com/login?fnm=reviews&redirect=' + success_url;}, submissionContainerUrl: window.location.href, productId: '30053772'});" title="Write a Review for the TaylorMade Burner SuperFast 2.0 Driver"> Write a Review for the TaylorMade Burner SuperFast 2.0 Driver</a>
@kdoran
kdoran / gist:1879383
Created February 21, 2012 22:15
compiled css
#BVUESExpanded {
color: #333333;
font-family: Arial,sans-serif;
font-size: 12px;
left: 25px;
line-height: 1.5em;
position: fixed;
right: 25px;
top: -100px;
z-index: 2147483647;
@kdoran
kdoran / gist:1861009
Created February 18, 2012 21:00
html woes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
University of Wisconsin–Madison
</title>
<link rel="stylesheet" href="http://www.wisc.edu/css/home.css?12353" type="text/css" media="all" />
<!--[if IE 6.0]>
@kdoran
kdoran / gist:1792210
Created February 10, 2012 19:52
update to product feed
<Category>
<ExternalId>make_every_swing_count</ExternalId>
<Name>Make Every Swing Count</Name>
<CategoryPageUrl>https://www.makeeveryswingcount.com/</CategoryPageUrl>
</Category>
@kdoran
kdoran / gist:1774008
Created February 8, 2012 21:25
PIE feed heading
The heading Feed heading needs to be changed to:
<?xml version="1.0" encoding="UTF-8"?>
<Feed xmlns="http://www.bazaarvoice.com/xs/PRR/PostPurchaseFeed/4.9">
And the date format needs to be changed from:
<TransactionDate>2012-01-21 00:00:00.000</TransactionDate>
to
@kdoran
kdoran / gist:1754332
Created February 6, 2012 19:43
show individual story link
<a href="javascript:void(0);" onclick="$BV.ui('sy', 'show_stories', {storyId: '18362', categoryId: 'make_every_swing_count', subjectType: 'category'});">Individual story</a>
@kdoran
kdoran / gist:1724789
Created February 2, 2012 17:38
deep link stories URL
<a href="http://stories.makeeveryswingcount.com/bvstaging/stories/8567stories-en_us/category/make_every_swing_count/story/make_every_swing_count/redirect.htm">Individual story</a>