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 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
@MarioRicalde
MarioRicalde / javascript_resources.md
Created Jul 25, 2014 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@MarioRicalde
MarioRicalde / tmux-cheatsheet.markdown
Created Jul 25, 2014 — forked from MohamedAlaa/tmux-cheatsheet.markdown
A comprensive cheat-sheet for everything Tmux.
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@MarioRicalde
MarioRicalde / imgdim.sh
Last active Aug 29, 2015
Copy the image dimensions as CSS via Terminal.
View imgdim.sh
function imgdim() {
echo "Image Dimensions copied to the Clipboard."
sips -g pixelHeight -g pixelWidth $1 | sed '1 d' | sed 's/ pixelHeight: \(.*\)/height: \1px;/' | sed 's/ pixelWidth: \(.*\)/width: \1px;/' | pbcopy
}
You can’t perform that action at this time.