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
| var pg = require('pg'); | |
| var sys = require( 'sys' ); | |
| var cs = "postgres://blarg:blarg@localhost/blarg-upload-development"; | |
| try { | |
| pg.connect( cs, function( err, client ) { | |
| var filename = "foobar"; | |
| var directoryId = 12345; | |
| try { | |
| client.query("INSERT INTO uploads(filename, directory_id) VALUES($1, $2)", [filename, directoryId]); |
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
| Started POST "/events/253/invite" for 64.134.224.28 at Wed Mar 23 16:44:33 +0000 2011 | |
| ActionController::RoutingError (No route matches "/events/253/invite"): | |
| woven@woven-staging:~/Outreach/live-manager$ rake routes | grep invite | |
| invite_event POST /events/:id/invite(.:format) {:action=>"invite", :controller=>"events"} | |
| woven@woven-staging:~/Outreach/live-manager$ ls app/controllers/events_controller.rb | |
| app/controllers/events_controller.rb | |
| woven@woven-staging:~/Outreach/live-manager$ grep "def invite" app/controllers/events_controller.rb | |
| def invite |
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
| <!doctype html> | |
| <html xmlns:ng="http://angularjs.org" xmlns:sencha="http://sencha.com"> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script> | |
| <script src="http://vivoh.com/sencha/sencha-touch.js" ng:autobind></script> | |
| <link href="http://vivoh.com/sencha/resources/css/sencha-touch.css" rel="styleshet" type="text/css"/> | |
| <script src="http://code.angularjs.org/angular-0.9.15.min.js" ng:autobind></script> | |
| <script type="text/javascript"> |
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
| <Sencha:Application name="MyApp"> | |
| <Sencha:Panel fullscreen="true" html="Hello World!"> | |
| <Sencha:Panel> | |
| </Sencha:Application> | |
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
| python prettyqr.py foo.png | |
| /home/oem/Tixfu/qr/lib/prettyqr/prettyqr/logos.py:34: Warning: 'with' will become a reserved keyword in Python 2.6 | |
| Traceback (most recent call last): | |
| File "prettyqr.py", line 5, in <module> | |
| from prettyqr.logos import clear_logo_space, get_svg_logo | |
| File "/home/oem/Tixfu/qr/lib/prettyqr/prettyqr/logos.py", line 34 | |
| with open(filename) as logo_svg: |
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
| python ./prettyqr.py --options "Some text or url" foo.png | |
| /home/oem/Tixfu/qr/lib/prettyqr/prettyqr/logos.py:34: Warning: 'with' will become a reserved keyword in Python 2.6 | |
| Traceback (most recent call last): | |
| File "./prettyqr.py", line 5, in <module> | |
| from prettyqr.logos import clear_logo_space, get_svg_logo | |
| File "/home/oem/Tixfu/qr/lib/prettyqr/prettyqr/logos.py", line 34 | |
| with open(filename) as logo_svg: |
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 void jrAuthenticationDidSucceedForUser(JRDictionary authInfo, | |
| String provider) { | |
| // {stat=ok, profile={googleUserId=123456, name={givenName=Chris, familyName=Dawson, formatted=Chris Dawson}, [email protected], displayName=zoinks, preferredUsername=zoinks, url=https://www.google.com/profiles/123456, providerName=Google, identifier=https://www.google.com/profiles/123456, [email protected]}} | |
| String status = authInfo.getAsString( "stat" ); | |
| if( 0 == status.compareTo("ok") ) { | |
| email = authInfo.getAsDictionary("profile").getAsString( "email"); | |
| showNotAssociatedView(); | |
| } | |
| else { | |
| showError( "Unable to login"); |
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 void jrAuthenticationDidReachTokenUrl(String tokenUrl, | |
| HttpResponseHeaders response, | |
| String tokenUrlPayload, | |
| String provider) { | |
| String cookies = response.getHeaderField("Set-Cookie"); | |
| sessionToken = cookies; | |
| } | |
| public void onActivityResult( int requestCode, int resultCode, Intent intent ) { | |
| RestClient client = new RestClient(SERVICE_URL); |
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
| (ns foobar.core | |
| (:use [compojure.core :only (GET POST defroutes)]] | |
| (:require (compojure handler route) | |
| [ring.util.response :as response] | |
| [ring.adapter.jetty :as jetty])) | |
| (defonce mapping (ref {})) | |
| (defonce counter (atom 0 )) |