Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Mario Ricalde MarioRicalde

🏠
Working from home
Block or report user

Report or block MarioRicalde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am marioricalde on github.
  • I am marioricalde (https://keybase.io/marioricalde) on keybase.
  • I have a public key ASBHC1_HoAIVPv5YPGbtRFwUOTcKW5gD1x-WX8Fwp1-jZwo

To claim this, I am signing this object:

@MarioRicalde
MarioRicalde / shopify_checkout.js
Created Oct 22, 2019
Shopify Checkout.liquid javascript helper to parse product list.
View shopify_checkout.js
console.clear()
var product_rows = document.querySelectorAll('.sidebar .product-table .product')
var products_main = []
var products_accs = []
var product_main_strings = ["Regex Title"]
var product_accs_strings = ["Regex Title2", "Regex Title3"]
var matchProducts = function(i) { if ( this.product.name.match(i) ) this.array.push(this.product) }
@MarioRicalde
MarioRicalde / shopify_checkout.js
Created Oct 22, 2019
Shopify Checkout.liquid javascript helper to parse product list.
View shopify_checkout.js
console.clear()
var product_rows = document.querySelectorAll('.sidebar .product-table .product')
var products_main = []
var products_accs = []
var product_main_strings = ["Regex Title"]
var product_accs_strings = ["Regex Title2", "Regex Title3"]
var matchProducts = function(i) { if ( this.product.name.match(i) ) this.array.push(this.product) }
View Vim Search and Replace Done Right.
" ---------------------------------------------------------------------------------------------------
" Search and Replace Functionality
" https://github.com/MarioRicalde/vim-qargs/tree/master/plugin
" :vimgrep /match/ **
" :Qdo %s//replace/g
command! -nargs=0 -bar Qargs execute 'args ' . s:QuickfixFilenames()
command! -nargs=1 -complete=command -bang Qdo call s:Qdo(<q-bang>, <q-args>)
command! -nargs=1 -complete=command -bang Grep call s:Grep(<q-bang>, <q-args>)
View offcanvas.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<body>
<div id="site-wrapper">
@MarioRicalde
MarioRicalde / useful_shell_commands.md
Created Jul 25, 2014
List of useful commands for day to day development.
View useful_shell_commands.md

Search Files

Search a file called httpd.conf in all directories:

find / -type f -name httpd.conf

Execute a command on all .conf files.

find / -type f -name httpd.conf -exec chmod 0700 {} \;
@MarioRicalde
MarioRicalde / sshd_config.sh
Created Jul 25, 2014
SSH config that is password less – the file for OSX is located in `/private/etc/sshd_config` – then restart ssh with `sudo killall ssh-agent`.
View sshd_config.sh
# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
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')
@MarioRicalde
MarioRicalde / css_resources.md
Created Jul 25, 2014 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@MarioRicalde
MarioRicalde / rails_resources.md
Created Jul 25, 2014 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.
View rails_resources.md

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
You can’t perform that action at this time.