Skip to content

Instantly share code, notes, and snippets.

View rsyring's full-sized avatar

Randy Syring rsyring

View GitHub Profile
@rsyring
rsyring / random.py
Created April 5, 2017 14:31
random string script using Click library
#!/usr/bin/env python
from __future__ import print_function
import random
import click
@click.command()
@click.argument('length', type=click.INT)
@rsyring
rsyring / keybase.md
Created February 5, 2016 21:41
keybase.md

Keybase proof

I hereby claim:

  • I am rsyring on github.
  • I am randysyring (https://keybase.io/randysyring) on keybase.
  • I have a public key ASAB9i5eth_mEtEPjCuc64rj3P9PEXrohrZe790bJn8yRwo

To claim this, I am signing this object:

@rsyring
rsyring / choosing.html
Last active August 29, 2015 14:21
FreeTDS: choosing a protocol version
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html data-ember-extension="1">
<head>
<title>Choosing a TDS protocol version</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title="FreeTDS User Guide" href="http://www.freetds.org/userguide/index.htm">
<link rel="UP" title="Install FreeTDS" href="http://www.freetds.org/userguide/install.htm">
<link rel="PREVIOUS" title="Install FreeTDS" href="http://www.freetds.org/userguide/install.htm">
<link rel="NEXT" title="servername Lookup" href="http://www.freetds.org/userguide/name.lookup.htm">
@rsyring
rsyring / gist:539797e18eada076bab1
Created July 23, 2014 15:20
autokeyed python dictionary using defaultdict
from collections import defaultdict
def autokeyed_dict():
return defaultdict(autokeyed_dict)
mydict = autokeyed_dict()
mydict['properties']['recent_conversion_event_name']['value'] = 'Test Drive Form'
@rsyring
rsyring / gist:9520549
Created March 13, 2014 01:50
parse python source for comments
def test_noqa_lines(codeString):
g = tokenize.generate_tokens(StringIO(codeString).readline) # tokenize the string
for toknum, tokval, srow, _, _ in g:
if toknum == N_TOKENS:
pass # do something
@rsyring
rsyring / gist:6895791
Created October 9, 2013 03:33
python keyring setup for ubuntu and virtualenvs
import os
from os import path as osp
import sys
import keyring
paths_to_link = (
'/usr/lib/python2.7/dist-packages/dbus',
'/usr/lib/python2.7/dist-packages/_dbus_bindings.so',
'/usr/lib/python2.7/dist-packages/_dbus_glib_bindings.so',
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='freb.xsl'?>
<!-- saved from url=(0014)about:internet -->
<failedRequest url="http://localhost:80/testapp4.0/default.aspx"
siteId="1"
appPoolId="Classic .NET AppPool"
processId="6860"
verb="POST"
remoteUserName=""
userName=""
@rsyring
rsyring / gist:4140704
Created November 24, 2012 17:58
rvm #718
rvm install 1.8.7
No binary rubies available for: downloads/ruby-1.8.7-p371.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.8.7-p371, this may take a while depending on your cpu(s)...
ruby-1.8.7-p371 - #downloading ruby-1.8.7-p371, this may take a while depending on your connection...
ruby-1.8.7-p371 - #extracting ruby-1.8.7-p371 to /usr/local/rvm/src/ruby-1.8.7-p371
ruby-1.8.7-p371 - #extracted to /usr/local/rvm/src/ruby-1.8.7-p371
Applying patch /usr/local/rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch
Applying patch /usr/local/rvm/patches/ruby/1.8.7/no_sslv2.diff
ruby-1.8.7-p371 - #configuring
@rsyring
rsyring / gist:2562557
Created April 30, 2012 20:50
monodevelop nunit bug #4776
using System;
using NUnit.Framework;
using SomeProject.Tests.Utils;
namespace Some.Project.Tests {
[SetUpFixture]
public class DBInit {