Skip to content

Instantly share code, notes, and snippets.

View joeyhoer's full-sized avatar

Joey Hoer joeyhoer

View GitHub Profile
@yomotsu
yomotsu / _mixin_linear-gradient.scss
Created May 14, 2011 07:22
sass @Minxin linear-gradient() including SVG code for IE9
@mixin linear-gradient($angle, $color1, $offset1, $color2 ,$offset2:100, $color3:null, $offset3:100, $color4:null, $offset4:100, $color5:null, $offset5:100){
$angle_webkit:'left top, left bottom';
$angle_svg:'%20x2%3d%220%25%22%20y2%3d%22100%25%22';
$color-stop1_css:'#'#{$color1}' '#{$offset1}'%';
$color-stop2_css:',#'#{$color2}' '#{$offset2}'%';
$color-stop3_css:'';
$color-stop4_css:'';
$color-stop5_css:'';
$color-stop1_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color1}'%22%20offset%3d%22'#{$offset1}'%25%22%2f%3e';
$color-stop2_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color2}'%22%20offset%3d%22'#{$offset2}'%25%22%2f%3e';
@stevenbenisek
stevenbenisek / undoing-tables.html
Last active December 12, 2015 02:19 — forked from aarongustafson/undoing-tables.html
Add wai-aria roles
<table role="grid">
<thead>
<tr role="row">
<th scope="col" role="columnheader">Name</th>
<th scope="col" role="columnheader">Email</th>
<th scope="col" role="columnheader">Dept, Title</th>
<th scope="col" role="columnheader">Phone</th>
</tr>
</thead>
<tbody>
@Trippnology
Trippnology / .htaccess
Created February 25, 2013 14:49
Apache: 5G Blacklist 2013 (for .htaccess)
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
@BrianGilbert
BrianGilbert / pngout.rb
Last active March 11, 2016 17:35 — forked from paulredmond/pngout.rb
PNGOut Homebrew Formula
require 'formula'
class Pngout < Formula
url 'http://static.jonof.id.au/dl/kenutils/pngout-20130221-darwin.tar.gz'
homepage 'http://www.jonof.id.au/kenutils'
sha256 '995cc1df35e68b723c8143ad82c058be763f9af4fc373894ec74de3e7f18d0dd'
version '20130221'
def install
prefix.install Dir['*']
@johan
johan / README.md
Last active December 25, 2016 18:46
svg2abs / svg2rel shell tools
@ArnaudLigny
ArnaudLigny / Narno_Mage_Extension.php
Last active February 27, 2017 11:50
Get download link of a Magento extension from MagentoConnect key.
<?php
/**
* Get download link of a Magento extension from MagentoConnect key
*
* Dependencies: Zend_Http_Client, Zend_Uri (Zend Framework)
*/
class Narno_Mage_Extension
{
protected $_key = null;
@kjkuan
kjkuan / bashflow.sh
Created February 26, 2017 20:40
For-All Each-Do Success Fail
#!/usr/bin/env bash
#
# This is a hack that allows you to express loop and conditional processing
# of an array of items in terms of function definitions.
#
# My initial motivation came from the need to process an array of items, and
# then for those successfully processed items, do another different processing
# step, and similarly for the failed items; perform further processing/filtering
# steps for each failed/successful items.
#
@ttscoff
ttscoff / image_tag.rb
Created February 16, 2014 15:02
Custom Jekyll image tag with lazy loading and CDN changes
# Title: Simple Image tag for Jekyll
# Authors: Brandon Mathis http://brandonmathis.com
# Felix Schäfer, Frederic Hemberger
# Description: Easily output images with optional class names, width, height, title and alt attributes
#
# Syntax {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %}
#
# Examples:
# {% img /images/ninja.png Ninja Attack! %}
# {% img left half http://site.com/images/ninja.png Ninja Attack! %}
@sumdog
sumdog / stripfootnotes.rb
Created November 7, 2015 09:05
Jekyll plug-in for stripping footnotes from kramdown encoded text
require 'nokogiri'
module Jekyll
module StripFootnotesFilter
def strip_footnotes(raw)
doc = Nokogiri::HTML.fragment(raw.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => ''))
for block in ['div', 'sup', 'a'] do
doc.css(block).each do |ele|
.random-color {
border-top-color: "LightCoral";
border-right-color: #a44b58;
border-bottom-color: rgb(108, 188, 134);
border-left-color: rgb(24%, 88%, 5%);
outline-top-color: hsl(88, 69%, 69%);
outline-right-color: rgba(220, 71, 132, 0.69);
outline-bottom-color: rgba(79%, 47%, 14%, 0.37);
outline-left-color: hsla(111, 31%, 38%, 0.86);
}