Skip to content

Instantly share code, notes, and snippets.

View imathis's full-sized avatar
🍽️
Hungry for biscuits.

Brandon Mathis imathis

🍽️
Hungry for biscuits.
View GitHub Profile
### Keybase proof
I hereby claim:
* I am imathis on github.
* I am imathis (https://keybase.io/imathis) on keybase.
* I have a public key whose fingerprint is 86CA 84D1 66C9 FB97 44F8 2C6C 661F 438D 54B2 EA61
To claim this, I am signing this object:
@imathis
imathis / Readme.markdown
Last active August 29, 2015 14:05
Full with image in a max width content column

Allow any element to expand beyond the width of its parent container to fill the width of the browser window using vw and calc(). This is especially useful with images. Check out the Codepen demo.

This code is licensed under the MIT License.

@imathis
imathis / Readme
Last active August 29, 2015 14:11
Workflow vs. Curl
Workflow concept:
1. Copy url from an instagram post, in this case "http://instagram.com/p/wwlwpFNCFe/".
2. Run a workflow which starts with a url from the clipboard and saves a photo to my camera library.
Workflow url: https://workflow.is/workflows/ba13f22dc7c34983a07d88978164bae1
I believe the problem is that when converting rich text to HTML, the parser removes stuff.
When I stop before the parser and send the webarchive to myself, the source has quite a bit more content than the rich text source.
# Pretty much pseduo code
# Let's just assume you're in a loop where you are generating each post
new_data = {
'title' => 'Some new title for this generated post post'
}
site.posts << Series::Post.new(site, site.source, index, post, new_data)
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem 'octopress-littlefoot'
gem 'octopress-solarized'
gem 'octopress-codefence'
gem 'octopress-feeds'
gem 'octopress-multilingual'
end
@imathis
imathis / SASS opacity mixin
Created July 16, 2009 19:50
Use this SASS mixin to assign cross-browser CSS opacity
// expects a number from 0 to 100
=opacity(!opacity)
:opacity= !opacity / 100
:-moz-opacity= !opacity / 100
:-ms-filter= "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{!opacity})"
:filter= "alpha(opacity=#{!opacity})"
//**
Example use:
a
+sprite-bg("icons-32.png")
a.twitter
+sprite-column(1)
a.facebook
+sprite-column(2)
...
//**
Example 1:
a.twitter
+sprite-img("icons-32.png", 1)
a.facebook
+sprite-img("icons-32png", 2)
...
Example 2:
a
+sprite-background("icons-32.png")
!default_border_radius ||= 5px
// Round all borders by amount
=border-radius(!radius = !default_border_radius)
border-radius= !radius
-moz-border-radius= !radius
-webkit-border-radius= !radius
// Round radius at position by amount.
// values for !vert: "top", "bottom"
=gradient(!type, !coords, !color_start, !color_end, !color_stop = false)
!gradient= "#{!coords}, from(#{!color_start}), to(#{!color_end})"
@if !color_stop
!gradient= !gradient + ", " + !color_stop
background: -webkit-gradient(#{!type}, #{!gradient})
background: -moz-#{!type}-gradient(#{!gradient})
//*
Creates a radial gradient
Usage example: