Skip to content

Instantly share code, notes, and snippets.

View palimadra's full-sized avatar

Pali Madra palimadra

View GitHub Profile
<?php
/* Merge multiple RSS feeds with SimplePie
*
* Just modify the path to SimplePie and
* modify the $feeds array with the feeds you want
*
* You should probably also change the channel title, link and description,
* plus I added a CC license you may not want
*
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/
@palimadra
palimadra / fb-gallery-embed.html
Created January 31, 2014 07:09 — forked from alexdunae/fb-gallery-embed.html
Embed a Facebook gallery into your website
@palimadra
palimadra / dabblet.css
Created February 24, 2014 16:53 — forked from maxhoffmann/dabblet.css
CSS3 Image Gallery
/**
* CSS3 Image Gallery
*/
body {
background: black url(http://subtlepatterns.com/patterns/dark_wood.png);
font: 14px "Helvetica Neue", Helvetica, sans-serif;
}
h2 {
color: white;

A Starting Point for CSS Styleguides

This is a CSS styleguide that you could fork to use for your project. Some of the rules give you multiple acceptable options. If you want to adopt this styleguide for your project, you should modify it for your project.

Here is an example styleguide made from this starting point

This styleguide follows my styleguide for styleguides. That means it follows the following rules:

  • Focus on readability.
  • Focus on consistency.
@palimadra
palimadra / gist:f4ae3b5a8ccf965b3b07
Last active August 29, 2015 14:03 — forked from CristinaSolana/gist:1885435
How to ensure that forks are updated whenever the master is updated.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@palimadra
palimadra / .gitignore
Last active August 29, 2015 14:06 — forked from octocat/.gitignore
Some common gitmore instructions which should be added to a gitmore file in a github repository. A gitmore file has instructions on which files to exclude in a github sync therefore some common files need to be ignored if you have repository on which you are working locally.
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@palimadra
palimadra / currencies.liquid
Last active August 29, 2015 14:23 — forked from carolineschnapp/currencies.liquid
Code that needs to be added as a new snippet in the shopify theme to be used in conjunction with currency picker at https://gist.github.com/palimadra/842e597a01552a4d0c8f
{% if settings.show_multiple_currencies %}
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }}
{{ "jquery.currencies.min.js" | asset_url | script_tag }}
<script>
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}';
var shopCurrency = '{{ shop.currency }}';
@palimadra
palimadra / currency-pciker-shopify.html
Last active January 30, 2017 10:23 — forked from carolineschnapp/gist:773649
Currency picker snippet that needs to be added to the shopify theme in the snippets folder to be used in conjunction with currencies.liquid at https://gist.github.com/palimadra/98127337d73270923925
<label class="currency-picker__wrapper">
<span class="currency-picker__label">Pick a currency</span>
<select class="currency-picker" name="currencies" style="display: inline; width: auto; vertical-align: inherit;">
{% assign codes = 'USD,EUR,GBP,CAD,ARS,AUD,BBD,BDT,BSD,BHD,BRL,BOB,BND,BGN,ILS,MMK,KYD,CLP,CNY,COP,CRC,HRK,CZK,DKK,DOP,XCD,EGP,XPF,FJD,GHS,GTQ,GYD,GEL,HKD,HUF,ISK,INR,IDR,NIS,JMD,JPY,JOD,KZT,KES,KWD,LVL,LTL,MXN,MYR,MUR,MDL,MAD,MNT,MZN,ANG,NZD,NGN,NOK,OMR,PKR,PYG,PEN,PHP,PLN,QAR,RON,RUB,SAR,RSD,SCR,SGD,SYP,ZAR,KRW,LKR,SEK,CHF,TWD,THB,TZS,TTD,TRY,UAH,AED,UYU,VEB,VND,ZMK' | split: ',' %}
{% assign supported_codes = settings.supported_currencies | split: ' ' %}
<option value="{{ shop.currency }}" selected="selected">{{ shop.currency }}</option>
{% for code in supported_codes %}
{% if code != shop.currency and codes contains code %}
<option value="{{ code }}">{{ code }}</option>
{% endif %}
// How to add a bookmarklet to Chrome: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=chrome%20bookmarklet
javascript:(function getScreenshot() {var openScreenshot = function(e) {window.open(e.originalEvent.data);}; $(window).unbind("message.getScreenshot", openScreenshot); $(window).bind("message.getScreenshot", openScreenshot); ScratchpadUI.liveEditor.postFrame({ screenshot: true, screenshotSize: 400 });})();
@palimadra
palimadra / Google Blogger Social Meta Tags.html
Created January 6, 2016 09:14 — forked from milanaryal/Google Blogger Social Meta Tags.html
Google Blogger/BlogSpot Social Meta Tags for Facebook, Twitter, Google+, Pinterest [v1.0]
<!-- add the following code in the head tag -->
<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<!-- Share Image -->
<link href='YOUR_LOGO_IMAGE' rel='image_src'/>
<!-- Open Graph Meta Tags -->
<b:if cond='data:blog.pageType != &quot;index&quot;'>
<meta expr:content='data:blog.title' property='og:site_name'/>