Skip to content

Instantly share code, notes, and snippets.

View MarioRicalde's full-sized avatar

Mario Ricalde MarioRicalde

View GitHub Profile

Zapier YouTube Playlist to Spotify Playlist sync

Actions:

  1. Trigger: New Video in Playlsit in YouTube
  2. Action: Run javascript (below)
  3. Action: Find Track in Spotify (using artist and track from previous step)
  4. Action: Add Track to Playlist in Spotify (id passed from previous step )

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 October 22, 2019 05:02
Shopify Checkout.liquid javascript helper to parse product list.
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 October 22, 2019 05:02
Shopify Checkout.liquid javascript helper to parse product list.
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) }
" ---------------------------------------------------------------------------------------------------
" 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>)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<body>
<div id="site-wrapper">
@MarioRicalde
MarioRicalde / useful_shell_commands.md
Created July 25, 2014 23:28
List of useful commands for day to day development.

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 July 25, 2014 23:08
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`.
# $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
@MarioRicalde
MarioRicalde / Capybara Cheat Sheet
Created July 25, 2014 08:04 — forked from zhengjia/capybara cheat sheet
A 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 July 25, 2014 07:57 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

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