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
2011-05-05T17:44:15+00:00 app[web.1]: Configuration from /app/_config.yml | |
2011-05-05T17:44:16+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:243:in `mkdir': Permission denied - /app/_site (Errno::EACCES) | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:217:in `mkdir_p' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:215:in `reverse_each' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:215:in `mkdir_p' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:201:in `each' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:201:in `mkdir_p' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /app/.gems/gems/jekyll-0.10.0/lib/jekyll/post.rb:198:in `write' | |
2011-05-05T17:44:16+00:00 app[web.1]: from /app/.gems/gems/jekyll-0.10.0/lib/jekyll/ |
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
HttpClient httpClient = new DefaultHttpClient(); | |
HttpHead httpHead = new HttpHead(accountUrl); | |
long date = cachedFile.lastModified(); | |
String lastModified = DateUtils.formatDate(new Date(date), "EEE, d MMM yyyy HH:mm:ss 'GMT'"); | |
httpHead.addHeader("If-Modified-Since", lastModified); | |
HttpResponse response = httpClient.execute(httpHead); | |
int statusCode = response.getStatusLine().getStatusCode(); | |
return statusCode != HttpStatus.SC_NOT_MODIFIED; |
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
public static void Main (string[] args) | |
{ | |
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://example.com/file.xml"); | |
// Note that previousValue is a DateTime now! | |
request.IfModifiedSince = DateTime.Now; | |
try | |
{ | |
using (WebResponse response = request.GetResponse()) |
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
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
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
CREATE TABLE landmarks | |
( | |
gid serial NOT NULL, | |
name character varying(50), | |
address character varying(50), | |
date_built character varying(10), | |
architect character varying(50), | |
landmark character varying(10), | |
latitude double precision, | |
longitude double precision, |
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
\copy landmarks(name,address,date_built,architect,landmark,latitude,longitude) FROM '/local/path/to/Individual_Landmarks.csv' DELIMITERS ',' CSV HEADER; |
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
UPDATE landmarks | |
SET the_geom = ST_GeomFromText('POINT(' || longitude || ' ' || latitude || ')',4326); |
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
-- distance units in planar degrees. 4326 is WGS 84 and the long lat units are degrees | |
SELECT | |
ST_Distance(ST_GeomFromText('POINT(-87.6348345 41.8786207)', 4326), landmarks.the_geom) AS planar_degrees, | |
name, | |
architect | |
FROM landmarks | |
ORDER BY planar_degrees ASC | |
LIMIT 5; |
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
SELECT landmarks.name, landmarks.architect, landmarks.address | |
FROM landmarks,wards | |
WHERE ST_Contains(wards.the_geom, landmarks.the_geom) AND wards.ward = '43'; |
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/python | |
''' | |
Copyright 2009, The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |