Skip to content

Instantly share code, notes, and snippets.

View EtienneLem's full-sized avatar

Etienne Lemay EtienneLem

View GitHub Profile
@EtienneLem
EtienneLem / _utils.scss
Created September 16, 2011 13:24
Scss utils.
// Scss Utils
// @author EtienneLem
// CSS3 misc
@mixin rounded ( $radius, $prefix:'' ) {
@include prefixes(border-radius, $radius, $prefix);
}
@mixin box-shadow ( $value ) {
@include prefixes(box-shadow, $value);
@EtienneLem
EtienneLem / Compile CoffeeScript to JS.tmCommand
Created March 7, 2012 15:43
Compile CoffeeScript to JS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env ruby
# encoding: utf-8
@EtienneLem
EtienneLem / cookie.rb
Created March 8, 2012 18:56
Cookie expiration date [Ruby]
@EtienneLem
EtienneLem / BrowserDetect.coffee
Created April 5, 2012 18:39
BrowserDetect (Coffeescript)
# Original BrowserDetect.js: @Teevio (http://teev.io/blog/text/13423292)
# Original idea: @rogie (http://rog.ie/post/9089341529/html5boilerplatejs)
# CoffeeScript implementation: @EtienneLem
class BrowserDetect
@init: ->
browser = @searchString(@dataBrowser) || "An unknown browser"
version = @searchVersion(navigator.userAgent) || @searchVersion(navigator.appVersion) || "An unknown version"
os = @searchString(@dataOS) || "An unknown OS"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env ruby
# encoding: utf-8
@EtienneLem
EtienneLem / Rakefile
Created October 18, 2012 15:27
Sinatra (javascript|stylesheet)_include_tag helper w/ Rakefile tasks
namespace :assets do
# `bundle exec rake assets:compile`
# * Compile stylesheets and javascripts
desc 'compile assets'
task :compile => [:compile_css, :compile_js] do
end
# `bundle exec rake assets:compile_css`
# IN => /app/assets/stylesheets/styles.styl
# OUT => /public/css/styles-<version>.min.css
@EtienneLem
EtienneLem / gist:4032653
Created November 7, 2012 16:33 — forked from daneden/gist:4032573
Sass media queries and @extend
// Fairly safe way to visually hide content, but make it accessible to screen readers
.visually-hidden {
position: absolute;
left: -9999px;
height: 1px;
}
@media screen and (max-width: 700px) {
// Again, accessible to screen readers
// Example: <a href="/login" class="icon icon-twitter"><span class="mobile-offscreen">Single-click </span> log in with Twitter</a>
@EtienneLem
EtienneLem / .zshrc
Last active December 10, 2015 06:28
rdio-cli zsh completions
# As of right now, it will only work with a rdio-cli build from https://github.com/EtienneLem/rdio-cli/tree/commands-list
# Rdio completions
rdio_commands=(`rdio commands`)
compctl -k rdio_commands rdio
@EtienneLem
EtienneLem / challenge.md
Last active December 10, 2015 14:08 — forked from rafbm/challenge.md

CSS Challenge #2

You start with this:

And must end up with this:

@EtienneLem
EtienneLem / inline-block.html
Created February 28, 2013 00:26
Display inline-block example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
* {
margin: 0; padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;