Skip to content

Instantly share code, notes, and snippets.

@beccasaurus
beccasaurus / ruby-docs-samples
Last active September 2, 2017 00:29
Ruby Docs Samples for Stackdriver
ruby-docs-samples/stackdriver
├── README.md
├── rails_configuration.rb
├── sinatra_debugger.rb
├── rack_debugger.rb
├── sinatra_trace.rb
└── rack_trace.rb
@beccasaurus
beccasaurus / datastore.rb
Created April 23, 2017 21:02
6 LOC :: Google Cloud Client Library Samples
require "google/cloud/datastore"
datastore = Google::Cloud::Datastore.new
query = datastore.query("Dog").limit(5)
datastore.run(query).each do |dog|
puts dog["name"]
end
@beccasaurus
beccasaurus / RÉMI <3 IDIOMS :: TOP 10 LIST .md
Last active April 25, 2017 21:28
RÉMI <3 IDIOMS :: TOP 10 LIST

rémi's most favoritest idiomatic bits from Google Cloud Client Libraries

#1 Make an entity

task = datastore.entity "Task" do |t|
  t["type"] = "Personal"
  t["done"] = false
  t["priority"] = 4
  t["description"] = "Learn Cloud Datastore"
@beccasaurus
beccasaurus / Simplest WEBrick Flex.rb
Created March 27, 2017 05:59
Simplest WEBrick Flex
require "webrick"
server = WEBrick::HTTPServer.new Port: ENV["PORT"]
server.mount_proc("/"){|_,r| r.body = "Hello" }
server.start
@beccasaurus
beccasaurus / _screenshot.png
Last active March 24, 2017 01:45
Override RAILS_ENV and other environment variables on App Engine Flex
_screenshot.png
@beccasaurus
beccasaurus / App Engine Flex :: WEBrick Hello World.md
Last active April 4, 2017 18:24
App Engine Flex :: Ruby WEBrick Hello World :: cloud.google.com/ruby

Google Cloud Platform logo

App Engine Flex : Hello World!

Run a simple Ruby app! Just using WEBrick, no dependencies! Ruby standard library only!

Run locally

$ ruby app.rb

@beccasaurus
beccasaurus / _ textme _ .md
Last active November 14, 2016 20:07
textme :: Text me after a long-running command finishes

xkcd compiling comic

Do you find yourself frequently getting coffee while you wait for your code to compile? ☕

Test suite take a long time to run?

Application taking awhile to deploy?

Not to worry!

@beccasaurus
beccasaurus / RailsBridge_NOTES.md
Last active July 16, 2016 22:28
RailsBridge notes - July 16, 2016
  • When editing ... it says "refresh" but should say to go to the /edit page
  • Open new terminal and run rails c - people didn't now to go to the root dir of the rails app
  • Deploying to Heroku --- needed to heroku create again?
  • when you heroku open it takes you to a 404 page because there is no home page for the Job Board!

Misc: will we do a retrospective? Without volunteers?

@beccasaurus
beccasaurus / Gemfile
Last active February 21, 2016 21:50
Nordy Orders
source "https://rubygems.org"
gem "sequel"
gem "sqlite3"
gem "poltergeist"
@beccasaurus
beccasaurus / background.html
Last active December 16, 2015 04:19
Copy Rally Link
<html>
<head>
<script src='background.js'></script>
<style>
a#link {
color: #15c;
font-family: arial;
font-size: 13px;
}
</style>