Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working from home

Mohamed Ziata WaKeMaTTa

💻
Working from home
View GitHub Profile
@pat
pat / thinking_sphinx.yml
Last active Sep 30, 2020
Thinking Sphinx Configuration
View thinking_sphinx.yml
# Extended configuration for Thinking Sphinx can be stored in the
# config/thinking_sphinx.yml file within your application (this file was
# previously known as config/sphinx.yml in TS v1/v2).
#
# Many settings from Sphinx itself can be set here, and they'll flow through to
# the appropriate section of the generated configuration. However, some are
# used for Thinking Sphinx behaviour, and so those are documented here first.
#
# Configuration is grouped by environment, just like config/database.yml in a
# standard Rails application.
@WaKeMaTTa
WaKeMaTTa / order-rails-controller-callbacks.md
Last active Jul 29, 2019
Order of Rails Controller Callbacks
View order-rails-controller-callbacks.md

Order of Rails Controller Callbacks

Rails 4.x

Started GET "/" for 127.0.0.1 at 2017-05-19 14:17:18 +0200
  Processing by WelcomeController#index as HTML
    prepend_around_action
    prepend_before_action
    before_action
View shopify-react.md

Templating engines and React.js

I want to make a shopify theme using react.

How shopify theming works

You have a bunch of template files that have access to global server-side variables with liquid e.g. {{ product.title }}. Think wordpress or any other theme-based system.

 /theme
@dteoh
dteoh / arel_select_star_from_table.rb
Last active Dec 2, 2019
Select all columns of an Arel table
View arel_select_star_from_table.rb
users = User.arel_table
query = users.project(users[Arel.star])
@freshtonic
freshtonic / pre-commit
Last active Jan 14, 2019
Git commit hook to abort commits when I accidentally commit dumb shit.
View pre-commit
#!/usr/bin/env ruby
# Checks for things that I often commit accidentally and bails out of the
# commit. To skip this pre-commit hook use `git commit --no-verify`.
checks = [
/\bddescribe\b/,
/\biit\b/,
/\bxit\b/,
/binding.pry/,
@jhjguxin
jhjguxin / how_to_concerns.md
Last active Nov 28, 2018 — forked from dhh/gist:1014971
how to concerns with rails 3
View how_to_concerns.md
@zenorocha
zenorocha / README.md
Last active Oct 12, 2020
A template for Github READMEs (Markdown) + Sublime Snippet
View README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@leesmith
leesmith / setup.md
Created May 16, 2012
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)
View setup.md

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

@ziadoz
ziadoz / awesome-php.md
Last active Sep 16, 2020
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
You can’t perform that action at this time.