Skip to content

Instantly share code, notes, and snippets.

Omar López zomars

Block or report user

Report or block zomars

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
@zomars
zomars / renderFieldsArray.js
Created Aug 29, 2018
Render redux-form Fields component
View renderFieldsArray.js
const renderFields = fields =>
Object.keys(fields).map((name, i) => {
if (!fields[name].input) return null;
return (
<Grid item xs={12}>
<Field
key={name}
name={name}
label={fields.labels[i]}
{...fields[name]}
View responsive-logo-04.html
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
.square,
.landscape { visibility: hidden; }
.portrait { visibility: visible; }
@media (min-aspect-ratio: 1/1) {
.portrait,
.landscape { visibility: hidden; }
.square { visibility: visible; }
@zomars
zomars / sort-by.liquid
Last active May 15, 2018
Sort products in Shopify via dropdown in vanilla JavaScript
View sort-by.liquid
{%- comment -%}
Put it in your snippets folder and include it in your templates:
{% include 'sort-by' %}
{%- endcomment -%}
<div id="sort-by-container"></div>
<script>
// Get the URL search parameters
const params = new URLSearchParams(location.search);
const currentParams = params.get('sort_by');
View boltflow_inuit_config_local_dev.yml
# This is the DEVELOPMENT version of config_local.yml
# Database credentials.
database:
driver: mysql
databasename: bolt
username: database_user
password: 'hunter42'
# Use unoptimized theme in development
@zomars
zomars / _table_set.twig
Created Jul 26, 2017
Print a table from Advanced Custom Fields: Table Field using Timber in Twig
View _table_set.twig
{% if table %}
<table>
{% if table.header %}
<thead>
<tr>
{% for th in table.header %}
<th>{{ th.c }}</th>
{% endfor %}
</tr>
</thead>
@zomars
zomars / inuitcss.css
Created May 12, 2017
Compiled InuitCSS for testing purposes
View inuitcss.css
@charset "UTF-8";
/* ==========================================================================
INUITCSS
========================================================================== */
/**
* inuitcss, by @csswizardry
*
* github.com/inuitcss | inuitcss.com
*/
/**
@zomars
zomars / inuitcss.css
Created May 12, 2017
Compiled InuitCSS for testing purposes
View inuitcss.css
@charset "UTF-8";
/* ==========================================================================
INUITCSS
========================================================================== */
/**
* inuitcss, by @csswizardry
*
* github.com/inuitcss | inuitcss.com
*/
/**
@zomars
zomars / boltflow-bitbucket-deploy.php
Last active Apr 7, 2017
Script to deploy from bitbucket via webhook and bobdenotter's Boltflow script (https://github.com/bobdenotter/boltflow)
View boltflow-bitbucket-deploy.php
<?php
$repo_dir = '/home/username';
$branch_to_deploy = 'master';
$update = false;
// Parse data from Bitbucket hook payload
$payload = json_decode($_POST['payload']);
if (empty($payload->commits)) {
View cpanel-subdomains-creator.php
<?php
###############################################################
# cPanel Subdomains Creator 1.1
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
#
# Can be used in 3 ways:
# 1. just open script in browser and fill the form
@zomars
zomars / Export Layers To Files (Clean).jsx
Created Dec 13, 2016
Export Photoshop layers to files without numeric sequence nor underscores
View Export Layers To Files (Clean).jsx
// Export Layers To Files (Clean)
// Copyright 2007. Adobe Systems, Incorporated. All rights reserved.
// This script will export each layer in the document to a separate file.
// Written by Naoki Hada
// ZStrings and auto layout by Tom Ruark
// Bug fixes by Eric Ching
// Modded for cleaner output by Zomars
/*
You can’t perform that action at this time.