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
from cloudsearch import connect_cloudsearch, get_document_service | |
endpoint = 'paste your doc service endpoint here' | |
service = get_document_service(endpoint=endpoint) # Get a new instance of cloudsearch.DocumentServiceConnection | |
# Presumably get some users from your db of choice. | |
users = [ | |
{ | |
'id': 1, |
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
""" | |
Modified version of cloudsearch.py as provided by https://gist.github.com/2367039#file_cloudsearch.py | |
""" | |
from math import ceil | |
import time | |
import json | |
import re | |
import boto | |
import boto.jsonresponse |
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
# file: /etc/boto.cfg or ~/.boto | |
[s3] | |
host = objects.dreamhost.com | |
calling_format = boto.s3.connection.OrdinaryCallingFormat | |
# You can configure your credentials here, | |
# in a separate config file, or in | |
# environment variables | |
[Credentials] | |
access_key_id = MyDHAccessKey |
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
#!/bin/sh | |
GREEN='#00ff00' | |
YELLOW='#ffc000' | |
RED='#ff0000' | |
PTIME="`ping -c 1 sip.onsip.com|grep time=|awk '{split($7,a,"="); split(a[2],b,".");print b[1]}'`" | |
echo "PING TIME: $PTIME" | |
if [ $PTIME -lt 60 ]; | |
then |
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
" SQLUtilities.vim | |
vmap <silent>sf <Plug>SQLU_Formatter<CR> |
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
### Keybase proof | |
I hereby claim: | |
* I am kopertop on github. | |
* I am cmoyer (https://keybase.io/cmoyer) on keybase. | |
* I have a public key whose fingerprint is E3B5 48DF C07B 68D8 1D16 62EA 8920 F20F 2F20 FBC4 | |
To claim this, I am signing this object: |
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
// Hover.com "Zone file import/export" has been *Planned* since 2011 | |
// https://help.hover.com/entries/471066-Zone-file-import-export | |
// Here's a brittle approximation of export. | |
// | |
// This is a modified version of the original hover-export.js to allow it to be used by a normal person (non-developer) | |
// | |
// 1. Add the following Bookmarklet to Chrome | |
// 2. login to your account: https://www.hover.com/domains | |
// 3. Go to the domain you want to export | |
// 4. Click on the HoverDump JS Bookmark |
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
#!/bin/bash | |
for index in $( algolia indices list --output jsonpath --template="{..name}" ); do | |
echo "Export ${index}" | |
algolia settings get ${index} > ${index}.json | |
# If you have jq installed, you can get pretty formatted JSON output using: | |
# algolia settings get ${index} | jq "." > ${index}.json | |
done | |
# Add the following to automatically commit and push to a repository | |
# git add *.json | |
# git commit -a --m "Automatic Settings Export" |