Skip to content

Instantly share code, notes, and snippets.

View cloudhead's full-sized avatar
🌴
On vacation

Alexis Sellier cloudhead

🌴
On vacation
View GitHub Profile

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

use std::io;
use std::net;
use std::os::unix::io::AsRawFd;
use std::os::unix::io::RawFd;
use std::time;
#[repr(C, packed)]
pub struct Descriptor {
fd: RawFd,
events: libc::c_short,
@cloudhead
cloudhead / gist:967157
Created May 11, 2011 19:38
LESS v1.1.0 - What's new

LESS v1.1.0 - What's new

@arguments special variable:

  .box-shadow () { -webkit-box-shadow: @arguments }

string interpolation:

content: "hello @{var}"; // replaced with value of @var

window.onload = function () {
if (! document.querySelectorAll) { // Quick & Dirty way to tell the good browsers from the bad ones.
alert("Please upgrade your browser to view this site.");
}
};
### Keybase proof
I hereby claim:
* I am cloudhead on github.
* I am cloudhead (https://keybase.io/cloudhead) on keybase.
* I have a public key whose fingerprint is 9453 A236 6051 325A 9983 4A19 0F08 5776 FC21 7A78
To claim this, I am signing this object:
// All elements which match this will be syntax highlighted.
var selector = 'code';
var keywords = ('var function if else for while break switch case do new '
+'continue delete return this true false throw catch typeof').split(' ');
// Syntax definition
// The key becomes the class name of the <span>
// around the matched block of code.
var syntax = {
package main
type Error struct {
Err error
}
func (e *Error) Error() string {
return e.Err.Error()
}
newtype Inventory = Inventory (IntMap (Maybe Item))
nextFreeSlot :: Inventory -> Maybe IntMap.Key
nextFreeSlot (Inventory inv) =
go $ IntMap.toAscList inv
where
go ((k, Nothing) : _) = Just k
go [] = Nothing
go (_ : xs) = go xs
@cloudhead
cloudhead / gist:1591794
Created January 10, 2012 23:08
LESS 1.2.0 CHANGELOG

LESS 1.2.0 CHANGELOG

  • mixin guards
  • new function percentage
  • new color function to parse hex color strings
  • new type-checking stylesheet functions
  • fix Rhino support
  • fix bug in string arguments to mixin call
  • fix error reporting when index is 0
  • fix browser support in webkit and IE
@cloudhead
cloudhead / bqueue.go
Created August 7, 2013 12:43
Blocking queue implementation
package queue
import "sync"
type Message string
type Queue struct {
wmu sync.Mutex
cmu sync.Mutex
slice []*Message