Skip to content

Instantly share code, notes, and snippets.

View rnewman's full-sized avatar

Richard Newman rnewman

  • AWS
View GitHub Profile
(ns com.example.service
(:refer-clojure)
(:import javax.jws.WebMethod
javax.jws.WebParam
javax.jws.WebService))
(definterface FooBarInterface
(#^String frobbleBaz [#^String name
#^String address
@rnewman
rnewman / android-2.2-ciphers.txt
Created January 21, 2012 18:59
OpenSSL Ciphers in Android
DHE-RSA-AES256-SHA
DHE-DSS-AES256-SHA
AES256-SHA
EDH-RSA-DES-CBC3-SHA
EDH-DSS-DES-CBC3-SHA
DES-CBC3-SHA
DES-CBC3-MD5
DHE-RSA-AES128-SHA
DHE-DSS-AES128-SHA
AES128-SHA
@rnewman
rnewman / chesney-hawkes-cocktail.txt
Created March 9, 2012 07:54
Chesney Hawkes cocktail
It's a blood orange flip, but 2+ times the ingredients. So named because you only need one.
(http://www.youtube.com/watch?v=heR0HA9hFhQ)
* Make an ounce or two of honey syrup by simmering equal parts honey and water for 5 minutes.
* Whisk one egg white for ten or twenty seconds, until it starts to foam.
* Add honey, three dashes of bitters, two ounces of blood orange juice, and three or four ounces of bourbon to a cocktail shaker.
* Shake well for ten seconds.
* Fill shaker with ice.
* Shake for ten or twenty more.
@rnewman
rnewman / gist:2010895
Created March 10, 2012 09:04
All records
1331367079.48: {id:"7JLnOIfoVqzC", type:"bookmark", title:"Getting Started", parentName:"Bookmarks Toolbar", bmkUri:"http://www.mozilla.com/en-US/firefox/central/", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"toolbar"}
1331367079.48: {id:"CmxPKUsOViAm", type:"query", queryId:"RecentlyBookmarked", title:"Recently Bookmarked", parentName:"Bookmarks Menu", bmkUri:"place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&queryType=1&sort=12&maxResults=10&excludeQueries=1", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"menu"}
1331367079.48: {id:"XQOZVUA21FpS", type:"bookmark", title:"Customize Firefox", parentName:"Mozilla Firefox", bmkUri:"http://www.mozilla.com/en-US/firefox/customize/", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"Rh3DElws6CrW"}
1331367079.48: {id:"YBtokzk3UMOi", type:"query", queryId:"MostVisited", title:"Most Visited", parentName:"Bookmarks Toolbar", bmkUri:"place:redirectsMode=2&sort=8&maxResults=10",
@rnewman
rnewman / gist:2047992
Created March 16, 2012 00:57
Possible query
UPDATED:
-- Obviously select something more useful than favicon_url, which will always be null.
SELECT bid, url, title, visits, hid, i.favicon_url AS favicon_url
FROM
(
-- Bookmarks without history.
SELECT b._id AS bid, b.url AS url, b.title AS title, -1 AS visits, -1 AS hid
FROM bookmarks b
WHERE b.folder = 0 AND b.url NOT IN (SELECT url FROM history)
@rnewman
rnewman / gist:2218222
Created March 27, 2012 17:31
Test error
From https://ci.mozilla.org/job/sync-android/171/consoleFull
SyncClientsEngineStage :: DEBUG: Uploading client record UTVi9VEr0LXp
BaseResource :: DEBUG: HTTP PUT http://localhost:15325/1.1/john/storage/clients/UTVi9VEr0LXp
BaseResource :: TRACE: Adding Basic Auth header.
SyncConfiguration :: DEBUG: Returning prefs for null
ClientUploadDelegate :: INFO: Client upload error. Aborting sync.
GlobalSession :: WARN: Aborting sync: Client upload failed.
SyncConfiguration :: DEBUG: Returning prefs for null
GlobalSession :: INFO: GlobalSession initialized with bundle null
@rnewman
rnewman / gist:2229195
Created March 28, 2012 18:33
Clear clients.
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://services-sync/rest.js");
function clearClients() {
let r = new RESTRequest(Weave.Service.storageURL + "clients");
r.setHeader("X-Confirm-Delete", "1");
r.delete();
}
clearClients();
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://services-sync/engines/clients.js");
Components.utils.import("resource://services-sync/resource.js");
function getClient() {
let r = new Resource(Weave.Service.storageURL + "clients/" + Clients.localID);
return r.get();
}
let ts = null;
@rnewman
rnewman / gist:2240379
Created March 29, 2012 17:27
Enable all the logs!
for x in CollectionKeys \
Command \
DelayedWorkTracker \
GlobalSession \
InfoCollections \
JPakeCrypto \
JPakeRequest \
SyncJPakeStage \
MetaGlobal \
MiddlewareSession \
# HG changeset patch
# Parent b87f9cc3ae84219b7de6af73b9ca10403512772d
# User Richard Newman <rnewman@mozilla.com>
Bug 740326 - Fix over-long log tag.
diff --git a/mobile/android/base/sync/net/SyncStorageRequest.java b/mobile/android/base/sync/net/SyncStorageRequest.java
--- a/mobile/android/base/sync/net/SyncStorageRequest.java
+++ b/mobile/android/base/sync/net/SyncStorageRequest.java
@@ -77,17 +77,17 @@ public class SyncStorageRequest implemen
this.resourceDelegate = this.makeResourceDelegate(this);