This file contains hidden or 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 hidden or 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 hidden or 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 <[email protected]> | |
# 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
otool -tv libfacebook_ios_sdk.a | |
Archive : libfacebook_ios_sdk.a (architecture armv6) | |
libfacebook_ios_sdk.a(FBRequest.o) (architecture armv6): | |
(__TEXT,__text) section | |
-[FBRequest loading]: | |
00000000 e59f3010 ldr r3, [pc, #16] ; 0x18 | |
00000004 e79f3003 ldr r3, [pc, r3] | |
00000008 e7900003 ldr r0, [r0, r3] |
This file contains hidden or 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
<sessions version="1"> | |
<category name="Regular Sessions"> | |
<session> | |
<title>let cygwin take you to a whole gnu world</title> | |
<speaker> | |
<name>Ryan Gerry</name> | |
<company></company> | |
<bio>A software craftsman with eight years of professional experience.</bio> | |
<headshot></headshot> | |
</speaker> |
This file contains hidden or 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
_dropnetClient.GetFile(selected.Path, (RestSharp.RestResponse r) => { | |
try { | |
using(FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite)) | |
using(BinaryWriter bw = new BinaryWriter(fs)) | |
{ | |
bw.Write(r.RawBytes); | |
} | |
} |
This file contains hidden or 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
NOTE: This is pulled from an email exchange and hopefully will be polished up and published as a blog post at http://blog.kevfoo.com but until then I'll just dump it here in a gist. If you have any questions leave comments or ask them in #monotouch on IRC. (I am klmcmahon on IRC) | |
<Begin Excerpt> | |
I'm going to do a quick brain dump and attach some code for a generator that was passed around on the #monotouch IRC channel. This is extremely raw and stream of conscious but probably what will become the blog post when it gets fleshed out better. | |
Step 1: You _HAVE_ to have a static library that has been compiled without THUMB code being generated. (NOTE: I haven't upgraded to iOS 4.3 tools and XCode yet but apparently this isn't the case anymore since Apple appears to have fixed the bug) There is a linker bug that Apple introduced and has yet to fix that causes problems at compile time when trying to link in static libraries with THUMB enabled. You can run a command via the shell to check the dumped output (here |