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
def test_fieldstorage_multipart_w3c_ubercore(self): | |
# Test basic FieldStorage multipart parsing (W3C sample) | |
BOUNDARY_UBERCORE = "4f6a9e85-0088-4ab0-9cf3-7f9948149807" | |
POSTDATA_UBERCORE = """--4f6a9e85-0088-4ab0-9cf3-7f9948149807 | |
Content-Disposition: form-data; name="name" | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Length: 64 | |
Content-Transfer-Encoding: binary | |
file:/storage/sdcard/Pictures/JPEG_20150728_101124_252379362.jpg |
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
--4f6a9e85-0088-4ab0-9cf3-7f9948149807 | |
Content-Disposition: form-data; name="name" | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Length: 64 | |
Content-Transfer-Encoding: binary | |
file:/storage/sdcard/Pictures/JPEG_20150728_101124_252379362.jpg | |
--4f6a9e85-0088-4ab0-9cf3-7f9948149807 | |
Content-Disposition: form-data; name="mimetype" | |
Content-Type: text/plain; charset=UTF-8 |
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
# salt-call archive.tar xvzf archive.tar.gz dest=/tmp/ | |
[INFO ] Executing command 'tar -xvzf archive.tar.gz dest=/tmp/' in directory '/root' | |
local: | |
- tar: dest=/tmp: Not found in archive | |
- tar: Exiting with failure status due to previous errors |
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
class postgis { | |
package { | |
"postgresql": ensure => latest; | |
"postgis": ensure => latest; | |
"gdal-bin": ensure => latest; | |
"postgresql-8.4-postgis": ensure => latest; | |
"postgresql-server-dev-8.4": ensure => latest; | |
"libpq-dev": ensure => latest; | |
} |
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/env python | |
"""diffsplit.py | |
Takes a unified diff and produces two files. | |
Example usage: | |
./diffsplit.py unified.diff file1.py file2.py | |
""" |
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
acs_geo_fields = [ | |
('FILEID', 1, 6), | |
('STUSAB', 7, 2), | |
('SUMLEVEL', 9, 3), | |
('COMPONENT', 12, 2), | |
('LOGRECNO', 14, 7), | |
('US', 21, 1), | |
('REGION', 22, 1), | |
('DIVISION', 23, 1), | |
('STATECE', 24, 2), |
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
$ rake db:migrate | |
(in /home/mapper/live/mapper) | |
no such file to load -- uploadcolumn | |
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' | |
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' | |
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' | |
/var/lib/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in `load' | |
/var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in `load_gems' |
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
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION | |
# Bootstrap the Rails environment, frameworks, and default configuration | |
require File.join(File.dirname(__FILE__), 'boot') | |
Rails::Initializer.run do |config| | |
config.action_controller.session = { |
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
$ rake gems | |
(in /home/mapper/live/mapper) | |
- [I] calendar_date_select | |
- [I] hoptoad_notifier | |
- [R] activesupport | |
- [I] uploadcolumn | |
- [I] mislav-will_paginate ~> 2.3.8 | |
- [I] prawn = 0.6.3 | |
- [I] prawn-core >= 0.6.3, < 0.7 | |
- [I] prawn-layout >= 0.3.2, < 0.4 |
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 JsonResult GraphOne ( int week ) { | |
if ( week == 0 || week > 10 ) { | |
week = 11; | |
} | |
var dc = new PortalDataContext( ); | |
List<object> actual = new List<object>( ); | |
for ( int i = 0 ; i < week ; i++ ) { |