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
-- Alter tables exported from Serena/PVCS Tracker to have primary key. | |
-- Then we can use SqlAlchemy's SQLsoup to work with it. | |
-- Use like: | |
-- sqlplus $USERNAME/$PASSWORD@$HOST_FQDN_OR_IP/xe < add_primary_key.sql | |
ALTER TABLE TRKASSOC add primary key (associd); | |
ALTER TABLE TRKCH add primary key (chid); | |
ALTER TABLE TRKCHG add primary key (chgid); | |
-- Nonstandard: ALTER TABLE TRKCTL add primary key (CTLid); | |
ALTER TABLE TRKCTL add primary key (ctltableid); |
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
import sys; reload(sys); sys.setdefaultencoding('utf-8') | |
import sqlite3 | |
import urllib2 | |
import urllib | |
import simplejson | |
login = 'your github id' | |
token = 'your github api key' | |
repo = 'username/reponame' |
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
<tbody> | |
<tal:block repeat="ur url_recs"> | |
<tr tal:define="odd repeat.ur.odd" | |
tal:attributes="class python: odd and 'odd' or 'even'"> | |
<td>${ur.datetime}</td> | |
<td>...</td> | |
</tr> | |
</tal:block> | |
</tbody> |
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 | |
# You have to enable the Custom Field for the tracker you're targetting: bug, feature, whatever. | |
# cf without 'id' doesn't set anything | |
# cf with 'id' and no 'name' sets that attr | |
# | |
# Upon creation we get a record back with custom fields filled in, with id: | |
# | |
# "custom_fields":[{"id":1, "name":"Operating System", "value":"FeedBSD"}, | |
# {"id":7, "name":"Operating System Version", "value":""}, | |
# {"id":2, "name":"Database", "value":""}, |
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 | |
# 2013-11-21 Chris Shenton <[email protected]> | |
# Send an Oracle TNS 'ping' to the host and port specified. | |
# If it's Oracle, we should get a response like: | |
# C"7(DESCRIPTION=(TMP=)(VSNNUM=0)(ERR=0)(ALIAS=l_ORCL_001)) | |
# String from base64 encoding packet sent by: | |
# http://www.jammed.com/~jwa/hacks/security/tnscmd/tnscmd | |
tnsstr="AFcAAAEAAAABNgEsAAAIAH//fwgAAAABAB0AOgAAAAAAAAAAAAAAAAAAAAA05gAAAAEAAAAAAAAAAChDT05ORUNUX0RBVEE9KENPTU1BTkQ9cGluZykp" | |
echo $tnsstr | base64 --decode | nc $1 $2 |
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
[buildout] | |
extensions = mr.developer | |
parts = | |
gae_sdk | |
gae_tools | |
app_lib | |
local_appserver_deps | |
nosetests | |
# order matters so that this python overwrites the one generated by gae_tools | |
# until they publish the fix https://github.com/prmtl/appfy.recipe.gae/pull/9 |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"time" | |
) | |
var i int |
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
#!/usr/bin/env python | |
import sys | |
from wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid.response import Response | |
from pyramid.view import view_config | |
from pyramid.view import view_defaults |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Apply policy to NEW bucket", | |
"Resources": { | |
"Queue": { | |
"Type": "AWS::SQS::Queue", | |
"Properties": { | |
"QueueName": "cshenton-tropo-queue" |
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
#!/usr/bin/env python3 | |
# Get file path from sys.argv and upload as a presigned URL | |
import os | |
import sys | |
import boto3 | |
import requests | |
asset_path = sys.argv[1] | |
_, asset_fname = os.path.split(asset_path) |
OlderNewer