Skip to content

Instantly share code, notes, and snippets.

View zenkbaries's full-sized avatar
🎯
Focusing

John Towery zenkbaries

🎯
Focusing
View GitHub Profile
@zenkbaries
zenkbaries / Class_home.rb
Created November 12, 2015 22:32
new class
class Home
attr_accessor :bedroom, :bathroom
def initialize(bedroom, bathroom)
@bedroom = bedroom
@bathroom = bathroom
end
def bedroom
@bedroom
<!DOCTYPE html>
<html>
<head>
<link href="/assets/marketing-24838e7e4c3f022523ca701e31b8865d.css" media="screen" rel="stylesheet" />
<script src="/assets/application-4c579007dc222abcc3c5a33d794f95f7.js"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="g68rXXGhXMKkvtRXy7LXfLzm00kgUYhZrxZUTYjWjPo=" name="csrf-token" />
<meta name="viewport" content="width=device-width, initial-scale=1">
@zenkbaries
zenkbaries / OrionChest rspec test
Created March 7, 2016 17:28
rspec test error result
[1] pry(#<Game>)> pieces.to_a
=> [#<Pawn id: 2235, type: "Pawn", row: 1, column: 4, in_game: true, player_id: 729, game_id: 243, created_at: "2016-03-07 16:45:49", updated_at: "2016-03-07 16:45:49", color: "black">]
[2] pry(#<Game>)> F.......................................................................................
Failures:
1) Moving pieces Dragging a piece(black_pawn) to a valid location
Failure/Error: visit game_path(game)
Capybara::Poltergeist::StatusFailError:
  'use babel';

  import ZenkbarieswordcountView from './zenkbarieswordcount-view';
  import { CompositeDisposable } from 'atom';

  export default {

    zenkbarieswordcountView: null,
    modalPanel: null,

Keybase proof

I hereby claim:

  • I am zenkbaries on github.
  • I am kbcoder (https://keybase.io/kbcoder) on keybase.
  • I have a public key ASCZQM45H_3R6Exjj4ybSwx1n9wiW82vLGOhAMI9PIOyzQo

To claim this, I am signing this object:

@zenkbaries
zenkbaries / MongoDB Connection with Promise
Created July 22, 2019 23:02
How to establish an connecting with mongoDB with Promise and .catch()
//
// Use this template to establish connection to MongoDB with Promise to handle error
// See documentation at https://mongoosejs.com/docs/connections.html
// If initial connection fails, it will not attempt to reconnect.
// It will attempt to reconnect if there's error AFTER the initial successful connection.
mongoose.connect(process.env.DB_URI, {useNewUrlParser: true})
.then(() => {
console.log("MongoDB database initial connection established successfully.");
})
*{
margin: 0;
padding: 0;
}
body, html{
height: 100%;
}
.container{
@zenkbaries
zenkbaries / reactOnHeroku.md
Last active January 24, 2020 18:28
Deploy React app to Heroku

To deploy React app, which was created using 'create-react-app --use-npm ', to Heroku, the following option need to be included:

heroku create <appname> --buildpack mars/create-react-app

If yo dont use those buildpack option, you might encounter Websocket error when opening the website using HTTPS instead of HTTP.

Information comes from https://create-react-app.dev/docs/deployment/#heroku

@zenkbaries
zenkbaries / update_rails_system_for_new_app.md
Last active June 25, 2021 03:26
Keeping rails updated

// use this to make sure all system is up to date before creating new rails app

gem update --system