Skip to content

Instantly share code, notes, and snippets.

View arest's full-sized avatar

Andrea Restello arest

View GitHub Profile
#!/bin/sh
#
# A hook script to switch between parameters files when checking out different branches of the same Symfony2 repo
#
# To enable this hook, rename this file to "post-checkout".
PREVIOUS_HEAD=$1
NEW_HEAD=$2
BRANCH_SWITCH=$3
@arest
arest / gist:c98762dac9a0fe1d2325
Last active August 29, 2015 14:07
Create a wishlist recoverable
-- phpMyAdmin SQL Dump
-- version 3.4.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: Ott 13, 2014 alle 17:34
-- Versione del server: 5.1.60
-- Versione PHP: 5.4.24
SET FOREIGN_KEY_CHECKS=0;
user[firstName]:Irina2
user[lastName]:Karabadjakova
user[address]:Brandaris 44
user[postalCode]:4902 CZ
user[address2]:via viavia
user[town]:Padova
user[province]:NBR
user[country]:? string:NL ?
user[telephone]:
Response Headersview source
@arest
arest / gist:cf02708454fc601afeba
Created November 26, 2014 15:34
Country manager
INSERT INTO `user` (`store_id`, `username`, `username_canonical`, `email`, `email_canonical`, `enabled`, `salt`, `password`, `last_login`, `locked`, `expired`, `expires_at`, `confirmation_token`, `password_requested_at`, `roles`, `credentials_expired`, `credentials_expire_at`, `first_name`, `last_name`, `address`, `address2`, `town`, `province`, `country`, `postal_code`, `sex`, `birthday`, `telephone`, `social_security_number`, `source`, `mobile_os`, `mobile_token`, `locale`, `facebook_id`, `facebook_access_token`, `privacy`, `newsletter`, `opted_out`, `opt_out_date`, `created_on`, `updated_on`, `deleted_on`, `external_user_id`, `has_changed_password`, `callback_url`, `notification_enabled`, `newsletter_html_format`, `full_name`) VALUES
(NULL, 'countrymanager', 'countrymanager', 'countrymanager@alessi.com', 'countrymanager@alessi.com', 1, 'l95ro8gqmbk0wgcosswk4s0wskgccck', 'YWJkYjgwOWFlODkzODI5YzE5M2EwZGQxMjczOTFhNWYwMzQwNGM1ODI5MTliODZiNWMxZGE4NjVkODE5ODY4MDQ1YzU4MTcwNmM4NzE4NDZhN2IxOGJmZDgyZGUxY2UzN2RlZTVjM

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php echo $this->getToolbarHtml() ?>
<?php // List mode ?>
@arest
arest / gist:12394b9dd4c4d0d14386
Created February 19, 2016 09:26
Molteni Store Json structure
[{"collections":[102],"brands":[],"id":181,"title":"Hyatt Inc","opening_times":"Beatae tempore doloremque voluptatibus voluptatem quos similique vero. Quia voluptatum similique velit labore quis vel in voluptatem.","address":"33367 Treutel Well Apt. 068","town":"Bruenburgh","postal_code":"55295","country":"BT","emails":["arempel@gmail.com","jaden33@gmail.com","tate36@bashirian.com"],"telephones":[],"telefax":"+53(7)4515893012","latitude":"45.445663","longitude":"11.819587","type":1},{"collections":[105],"brands":[],"id":188,"title":"Bechtelar, Weissnat and Spinka","opening_times":"Qui fugiat molestiae maxime in ad. Qui ullam libero reprehenderit quo occaecati incidunt quis deleniti.","address":"68089 Bradtke Mission","town":"Morarfort","postal_code":"20501","country":"PA","emails":["verda.marquardt@yahoo.com","jones.jammie@crist.com","xhartmann@yahoo.com"],"telephones":[],"telefax":"1-283-509-3137","latitude":"45.445663","longitude":"11.819587","type":1},{"collections":[102],"brands":[],"id":189,"title":"Will
@arest
arest / gist:bb993a09405063584603
Created March 17, 2016 11:17 — forked from matoakley/gist:1092571
MySQL to convert a string into a slug
LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name`
@arest
arest / using_meld_on_mac.md
Created May 9, 2016 07:29 — forked from p1nox/using_meld_on_mac.md
Using meld on Mac

Using Meld merging tool on Mac

  1. Install XQuartz

  2. Install meld with brew

     brew install meld
    
  3. Copy PYTHONPATH