Skip to content

Instantly share code, notes, and snippets.

from pywinauto import application, timings
import subprocess, pywinauto, time
def activation_window(app):
actwin = repeated_check(app, 'Dragon NaturallySpeaking 12.0 Activation')
actwinbutton = repeated_check(actwin, 'Activate Later')
repeated_check_generic(actwinbutton, 'Activate Later', button_ready)
return actwin
def profile_window(app):
@saltlakeryan
saltlakeryan / call_rt_api.php
Created February 28, 2014 17:56
RT Request Tracker API Call in PHP
<?php
//set POST variables
$url = 'https://myhost/rt-path/REST/1.0/search/ticket';
$fields = array(
'user' => ('rtuser'),
'pass' => ('rtpass'),
'format' => ('l'), //long format
'query' => ("Queue='mysupportqueue' and status !='resolved' and Created > '2013-03-10'")
);
@saltlakeryan
saltlakeryan / hello.java
Created March 20, 2014 18:26
Hello World for Swing
import java.awt.*;
import javax.swing.*;
import java.net.*;
import javax.jnlp.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class Hello {
static BasicService basicService = null;
public static void main(String args[]) {
@saltlakeryan
saltlakeryan / Hello.jnlp
Created March 20, 2014 18:54
Hello world jnlp file for java web start
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8000/" href="Hello.jnlp">
<information>
<title>Jnlp Testing</title>
<vendor>Example</vendor>
<homepage href="http://localhost:8000/" />
<description>Hello World JNLP</description>
</information>
<security>
<all-permissions/>
C:\Users\Administrator.MILESTONENVRMAS>route print
===========================================================================
Interface List
17...d8 9d 67 78 9b 8e ......HP Ethernet 1Gb 4-port 366i Adapter #4
15...d8 9d 67 78 9b 8d ......HP Ethernet 1Gb 4-port 366i Adapter #3
13...d8 9d 67 78 9b 8c ......HP Ethernet 1Gb 4-port 366i Adapter #2
11...d8 9d 67 78 9b 8f ......HP Ethernet 1Gb 4-port 366i Adapter
1...........................Software Loopback Interface 1
14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
from pywinauto import application, timings
import subprocess, pywinauto, time
def activation_window(app):
actwin = repeated_check(app, 'Dragon NaturallySpeaking 12.0 Activation')
actwinbutton = repeated_check(actwin, 'Activate Later')
repeated_check_generic(actwinbutton, 'Activate Later', button_ready)
return actwin
def profile_window(app):

From "Beginning Backbone.js":

function Message(subject, recipient, content) {
  this.subject = subject;
  this.recipient = recipient;
  this.content = content;
}

Message.prototype.show = function(){

@saltlakeryan
saltlakeryan / gist:8f0cf5cec7d8f049c155
Created July 17, 2014 15:54
HA Proxy example reverse proxy
http://docs.neo4j.org/chunked/stable/ha-haproxy.html
global
daemon
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
@saltlakeryan
saltlakeryan / flowcycle.sh
Last active August 29, 2015 14:04
git aliases
#!/bin/bash
flowcycle() {
EDITOR=vim
TAG=$(git tag | tail -1)
NEXTTAG="${TAG%.*}.$((${TAG##*.}+1))"
REL=$NEXTTAG
DIR="$( pwd )"
DOCKER_REPO="docker.nanofab.utah.edu:5000"
DOCKER_IMAGE="$(echo $DIR | perl -pe 's!.*/docker\-!!')"