Skip to content

Instantly share code, notes, and snippets.

2018-05-04T06:25:44Z p-11428 t-bkyp0 INFO: "{\"table_name\":\"transactions\",\"data\":{\"account_id\":372,\"amount\":26000.0,\"description\":\"Invoice # 907\",\"debit\":true,\"current_balance\":0.0}}"
2018-05-04T06:25:44Z p-11428 t-bkyp0 WARN: {:log_msg=>"[worker-create_record:1:3w7zri][#<Thread:0x0000000251af48>][create_record][#<Sneakers::Configuration:0x000000024761c8>] {\"table_name\":\"transactions\",\"data\":{\"account_id\":372,\"amount\":26000.0,\"description\":\"Invoice # 907\",\"debit\":true,\"current_balance\":0.0}}", :class=>"DbTupleCreator", :message=>"{\"table_name\":\"transactions\",\"data\":{\"account_id\":372,\"amount\":26000.0,\"description\":\"Invoice # 907\",\"debit\":true,\"current_balance\":0.0}}", :delivery_info=>{:consumer_tag=>"bunny-1525406417000-504673120793", :delivery_tag=>#<Bunny::VersionedDeliveryTag:0x0000000251b3a8 @tag=3, @version=0>, :redelivered=>false, :exchange=>"", :routing_key=>"create_record", :consumer=>#<Bunny::Consumer:19013260 @channel_id=1 @queue=create_record> @co
@xecutioner
xecutioner / RAILS_CHEATSHEET.md
Created April 11, 2018 04:22 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

https://gist.github.com/3cddcbd82f314f6c8f75 commands for checking the file sizes in linux
https://gist.github.com/b9e6d2480864fe96c31b Your problem with Vim is that you don't grok vi.
https://gist.github.com/05bf69daabc4bff40849 private_pub capistrano tasks
https://gist.github.com/e17aa8e91b2f1ed014ce vimrc-mcbook (secret)
https://gist.github.com/ed184c3b5ca4f28ebecc graph the project (secret)
https://gist.github.com/e99b52d48e24324bc18b ruby snippet (secret)
https://gist.github.com/8bda840e957ee281daa8 rails snippets (secret)
https://gist.github.com/2b9400c6fc5d5c6a2dd0 vimrc (secret)
https://gist.github.com/2efb48838e5e2661cf33 git tricks
https://gist.github.com/a6b81924757e46e699ee Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit co
Talk-ruby
Talk-ruby is a web portal where people can discuss various things about ruby. It also acts as a news aggregator for ruby where new things are automatically posted concerning ruby and ruby on rails.
The challenge.
Creators of talk ruby wanted to create a news aggregator for all news regarding ruby or ruby on rails but also enable visitors to be able to interact and express their thoughts about those news. They wanted to create a vibrant community of ruby enthusiasts around this platform.
The process.
Emitii is a simple, easy to use web based app that allows teams to view and download reports of the time spent for subsequent analysis as well as giving an advantage of sending daily reportings to almost any one.
The Challenge.
Emitii wanted to be a simple tool to serve teams and companies to track their time spent on various projects or tasks and provide user friendly analysis in as much simple way as possible.
The process.
We focused heavily on the simplicity and how we can help team analyze and improve their time spent across various projects and tasks.
Our solution.
---
- hosts: builo-test-web
strategy: debug
remote_user: ubuntu
gather_facts: false
pre_tasks:
- name: install aptitude
raw: sudo apt-get -y install aptitude
- name: install python

Feedback on proposal

My opinions.

  • First things first we should have our features shortlisted and documented being as descriptive as possible.
  • We should select a few unique selling or our strongest features to market and come up with stories to pitch . ( Use Elevator Pitch model or something else I leave it upto you explore the start up tools )
  • We should do the market validation based on the features we select to bring forward.
    • Would organizations be willing to use it?
    • Would organizations pay to use it ?
    • How much would be organizations be willing to pay for it ?

Setting up linux server using Ngix.

Steps to set up a server.

  • set up a hostname for your new server. hostnamectl set-hostname hostname
  • Set up a timezone for your new server. dpkg-reconfigure tzdata

Securing your server.

  • add user [ adduser user_name groups ]
  • Set up a ssh access for your new server. ssh-keygen -b 4096 with a passphrase.

Best practices for software development using Rails.

  • TDD all the way.
  • Code Coverage and other metrics.
    • simple_cov and metric_fu
  • No Logic in views use rails helpers and implement partials for DRYness.
    • app/helpers
  • No Business Logic in controllers.
    • No more than 5 lines in a method , No more than 100 lines in a class.
    • Fat Models skinny controllers. ( Later we will look into service and policy objects)
  • DRY
GIT(1) Git Manual GIT(1)
NNAAMMEE
git - the stupid content tracker
SSYYNNOOPPSSIISS
_g_i_t [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]