Skip to content

Instantly share code, notes, and snippets.

View paykroyd's full-sized avatar

Pete Aykroyd paykroyd

  • Google
  • Cambridge MA
View GitHub Profile
@paykroyd
paykroyd / gist:744065
Created December 16, 2010 21:37
curl example of how I ran into problems
$ elastic-mappings
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 2 0 2 0 0 48 0 --:--:-- --:--:-- --:--:-- 50
{}
$ curl -XPUT 'http://localhost:9200/twitter/' -d '
> index :
> number_of_shards : 3
> number_of_replicas : 2
> '
@paykroyd
paykroyd / GwtAppCacheLinker.java
Created April 25, 2011 18:51
GWT Cache Manifest Linker
// Specify the LinkerOrder as Post... this does not replace the regular GWT linker and runs after it.
@LinkerOrder(LinkerOrder.Order.POST)
public class GwtAppCacheLinker extends AbstractLinker {
public String getDescription() {
return "to create an HTML5 application cache manifest JSP template.";
}
public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException {
ArtifactSet newArtifacts = new ArtifactSet(artifacts);
// search through each of the compilation results to find the one for Safari. Then
@paykroyd
paykroyd / __init__.py
Created May 20, 2011 00:16
Awesome Comment
# info = email.message_from_string(cached_value)
#
# Need to replace the line above with the kludge below
# to fix the non-existent bug not fixed in this
# bug report: http://mail.python.org/pipermail/python-bugs-list/2005-September/030289.html
'((:name magit
:after (lambda () (global-set-key (kbd "C-x C-z") 'magit-status)))
(:name color-theme-zenburn :after (lambda() (color-theme-zenburn)))
(:name textmate
:type git
:url "git://github.com/defunkt/textmate.el.git"
:features textmate
:compile "textmate.el"
:after (lambda () (textmate-mode)))
gist-region - Copies Gist URL into the kill ring.
With a prefix argument, makes a private gist.
"video_assets": [
{
"formats": [
{
"mime-type": "application/x-shockwave-flash",
"url": "https://www.youtube.com/v/qyEVr9izl1M?version=3&f=videos&app=youtube_gdata",
"youtube-format": "5"
},
{
"mime-type": "video/3gpp",
paykroyd@demo-so-us-z1-001:~$ curl -XGET "http://localhost:8020/lookup?term=http://scobleizer.com/2011/11/20/the-facebook-freaky-line/" | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2938 0 2938 0 0 1943 0 --:--:-- 0:00:01 --:--:-- 1944
[
{
"created": "/Date(1322585443524)/",
"modified": null,
"name": "The Facebook Freaky Line \u2014 Scobleizer",
"properties": {
;; tramp rules
(require 'tramp)
(add-to-list 'tramp-default-proxies-alist
'("qa9" nil "/ssh:[email protected]:"))
(add-to-list 'tramp-default-proxies-alist
'("log1" nil "/ssh:[email protected]:"))
(add-to-list 'tramp-default-proxies-alist
'("demo-social1" nil "/ssh:[email protected]:"))
@paykroyd
paykroyd / hack.sh
Created April 1, 2012 13:53 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@paykroyd
paykroyd / springpad_oauth.sh
Created May 3, 2012 22:28 — forked from jhorman/springpad_oauth.sh
Springpad OAuth Help
# http://mojodna.net/2009/08/21/exploring-oauth-protected-apis.html
easy_install oauth-proxy
sudo gem install oauth
oauth --consumer-key XXXXX --consumer-secret XXXXX --access-token-url http://springpadit.com/api/oauth-access-token --authorize-url http://springpadit.com/api/oauth-authorize --request-token-url http://springpadit.com/api/oauth-request-token authorize
oauth-proxy --consumer-key XXXXX --consumer-secret XXXXX -p 8001