Skip to content

Instantly share code, notes, and snippets.

@knowuh
knowuh / gist:731003
Created December 6, 2010 21:37
sample of how to use google-spreadsheet-ruby
##############################################
## File sheet_reporter.rb
##############################################
require 'rubygems'
# gem install highline
require 'highline/import'
# gem install google-spreadsheet-ruby
java
-Dmaven.jnlp.version=plr-everything-jdic-otrunk-nlogo3-snapshot-0.1.0-20081130.105838
-Djava.library.path=/web/production/sds-java-runner/public/cache/pdfshellscripts/http/tels-develop.soe.berkeley.edu/8080/jnlp/org/concord/external/rxtx/rxtx-serial/rxtx-serial-linux-nar-2.1.7-r2.jar
/web/production/sds-java-runner/public/cache/pdfshellscripts/http/tels-develop.soe.berkeley.edu/8080/jnlp/org/telscenter/java/dev/jdic-native/jdic-native-linux-nar-20060613.jar
/web/production/sds-java-runner/public/cache/pdfshellscripts/http/tels-develop.soe.berkeley.edu/8080/jnlp/org/concord/external/tts/quadmore/quadmore-win32-nar-1.0-20080128.214245-1.jar
/web/production/sds-java-runner/public/cache/pdfshellscripts/http/tels-develop.soe.berkeley.edu/8080/jnlp/org/concord/sensor/vernier/vernier-goio/vernier-goio-win32-nar-1.4.0.jar
/web/production/sds-java-runner/public/cache/pdfshellscripts/http/tels-develop.soe.berkeley.edu/8080/jnlp/org/concord/sensor/labpro-usb-native/labpro-usb-native-win32-nar-0.1.0-20070606.192
kofi = User.find_by_login('kofi')
kofi.add_role('admin')
kofi.save
calibration1 =
if @activity.probe_type && @activity.probe_type.calibrations.length > 0 && @activity.collectdata1_calibration_active
Calibration.find(@activity.collectdata1_calibration_id)
else
nil
end
calibration2 =
if @activity.second_probe_type && @activity.second_probe_type.calibrations.length > 0 && @activity.collectdata2_calibration_active
Calibration.find(@activity.collectdata2_calibration_id)
else
create_table "itsidiy_activities", :force => true do |t|
t.integer "user_id"
t.string "uuid"
t.boolean "public"
t.boolean "draft"
t.string "short_name"
t.boolean "textile"
t.string "name"
t.string "description"
t.text "introduction"
[email protected]:stepheneb/diy.git
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "rigse"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
(! 2373)-> ls -la `which httpd`
-rwxr-xr-x 1 root root 315284 Mar 27 2010 /usr/sbin/httpd
(! 2374)-> ls -la /etc/httpd/conf.d
total 32
drwxr-xr-x 2 root root 4096 Apr 8 2010 .
drwxr-xr-x 4 root root 4096 Apr 8 2010 ..
-rw-r--r-- 1 root root 566 Mar 27 2010 proxy_ajp.conf
-rw-r--r-- 1 root root 392 Mar 27 2010 README
-rw-r--r-- 1 root root 9677 Mar 27 2010 ssl.conf
@knowuh
knowuh / gist:639857
Created October 22, 2010 03:12
access log
72.93.105.205 - - [21/Oct/2010:22:13:34 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
72.93.105.205 - - [21/Oct/2010:22:16:15 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 206 81355668
72.93.105.205 - - [21/Oct/2010:22:17:34 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
98.229.241.142 - - [21/Oct/2010:22:56:55 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
98.229.241.142 - - [21/Oct/2010:22:57:47 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
72.93.105.205 - - [21/Oct/2010:23:01:57 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
72.93.105.205 - - [21/Oct/2010:23:03:35 -0400] "GET /installers/Rites-201009.01-osx-installer.dmg HTTP/1.1" 200 86504844
Processing UsersController#index to json (for 127.0.0.1 at 2010-10-19 14:03:51) [GET]
User Load (0.8ms) SELECT * FROM "users"
Completed in 16ms (View: 2, DB: 1) | 200 OK [http://localhost/rails/users.json]
Processing DragonsController#index to json (for 127.0.0.1 at 2010-10-19 14:03:51) [GET]
Parameters: {"bred"=>"true", "activity_id"=>"1", "user_id"=>"19", "isEgg"=>"false", "isInMarketplace"=>"false"}
Dragon Load (0.9ms) SELECT * FROM "dragons" WHERE ("dragons"."bred" = 't' AND "dragons"."activity_id" = '1' AND "dragons"."isEgg" = 'f' AND "dragons"."user_id" = '19' AND "dragons"."isInMarketplace" = 'f')
Dragon Load (0.3ms) SELECT * FROM "dragons" WHERE ("dragons"."id" IN (4960,4958))
Dragon Load (0.2ms) SELECT * FROM "dragons" WHERE ("dragons"."id" = 4959)