Skip to content

Instantly share code, notes, and snippets.

View raghuvarmabh's full-sized avatar

raghu bhupatiraju raghuvarmabh

View GitHub Profile
@raghuvarmabh
raghuvarmabh / joel coding challenge.patch
Last active October 17, 2018 18:03
joel coding challenge
From 98e66e960491f10d543686211b30c3c6a8d61192 Mon Sep 17 00:00:00 2001
From: ydarbleoj <brady.joel@gmail.com>
Date: Tue, 16 Oct 2018 15:11:17 -0700
Subject: [PATCH 1/4] Added event model and migration
---
app/models/event.rb | 3 +++
db/migrate/20181016215050_create_events.rb | 11 +++++++++++
db/schema.rb | 10 +++++++++-
test/fixtures/events.yml | 13 +++++++++++++
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('XYZ Menu')
.addItem('Generate PO', 'createDcument')
.addToUi();
}
function createDcument() {
var activeSheet = SpreadsheetApp.getActiveSpreadsheet();
@raghuvarmabh
raghuvarmabh / restaurant.rb
Created July 10, 2018 18:18
Bare minimum rails project to experiment on models
# Instead of loading all of Rails, load the
# particular Rails dependencies we need
require 'sqlite3'
require 'active_record'
require 'pry'
# Set up a database that resides in RAM
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: ':memory:'