Skip to content

Instantly share code, notes, and snippets.

View gulraiznaseer's full-sized avatar
🎯
Focusing

Gulraiz gulraiznaseer

🎯
Focusing
View GitHub Profile
@gulraiznaseer
gulraiznaseer / config
Created October 21, 2022 11:34 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta

1- IDE

We prefer to use sublime/VS Code for development(you can opt for any IDE though, but that will mean no support from seniors for any issues relating it and that might lead to un-neccessary time waste thats why it is highly preferred to not use any other IDEs). You are encouraged to use sublime or VSCode.

Sublime:

Install Sublime3 (google or use this link) Here we will outline some basic configuration for sublime3 we usually use.

i- Settings Tweaks In sublime go to preferences->settings and place these in user settings tab along with other settings. Don't mess with default settings tab

@gulraiznaseer
gulraiznaseer / 42-things.md
Created May 13, 2022 07:32 — forked from PWSdelta/42-things.md
42 Sweet, sweet things Rails (and Ruby) can do. Wonderful reference.
@gulraiznaseer
gulraiznaseer / README
Created May 12, 2022 14:38 — forked from pifleo/README
Rails - models organization - Keep code structure in models consistent
# Keep code struture in models consistent
# Inspired by http://rails-bestpractices.com/posts/75-keep-code-struture-in-models-consistent
# One example: (From top to bottom)
associations
scopes
class methods
validates
callbacks
instance methods
@gulraiznaseer
gulraiznaseer / gist:b896ec71653d5b58ec990b4124e5af0e
Created May 12, 2022 14:38 — forked from wrburgess/gist:3778949
Setup wicked_pdf and wkhtmltopdf with Rails 3 and Heroku
@gulraiznaseer
gulraiznaseer / Simple Form.md
Created May 12, 2022 14:38 — forked from stevenyap/Simple Form.md
Simple Form Cheatsheet

Gemfile

gem 'simple_form'

Installation

rails generate simple_form:install
@gulraiznaseer
gulraiznaseer / _form.html.erb
Created May 12, 2022 14:38 — forked from brunopgalvao/_form.html.erb
HTML5 Datalist using Ruby on Rails form_for
<%= form_for @person do |f| %>
<%= f.label :first_name, "First Name" %>:
<%= f.text_field :first_name, list: 'first-name' %>
<datalist id="first-name">
<% Person.all.each do |person| %>
<option value="<%= person.first_name %>"></option>
<% end %>
</datalist>
<%= f.submit %>
<% end %>
@gulraiznaseer
gulraiznaseer / dokku_setup.md
Created May 12, 2022 14:38 — forked from joshteng/dokku_setup.md
Using Dokku to deploy a Rails Application

#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!

##Notes

  • Follow 12 factor design (include the rails_12factor gem)
  • Don't forget your Procfile with the command to start up your application server
  • I prefer using external hosted logging services like Logentries (not in this guide)
  • Set up performance monitoring AppSignal or New Relic (not in this guide)
@gulraiznaseer
gulraiznaseer / dokku_on_digital_ocean.md
Created May 12, 2022 14:38 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku