Skip to content

Instantly share code, notes, and snippets.

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

@drogus
drogus / Gemfile
Created April 23, 2012 18:34
Webmachine + ActionView pt2
source "http://rubygems.org"
gem "webmachine"
gem "actionpack"
gem "thin"
gem "datamapper"
gem "dm-migrations"
gem "dm-sqlite-adapter"
gem "debugger"
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@dafyddcrosby
dafyddcrosby / gist:4408779
Last active April 2, 2018 12:30
List of packages to install to run Steam on Fedora 17 64-bit (note - you will need to install the rpmfusion repos)
mesa-dri-filesystem.i686
libgcc.i686
glibc.i686
nss-softokn-freebl.i686
zlib.i686
libstdc++.i686
freetype.i686
nspr.i686
libogg.i686
libjpeg-turbo.i686
@lukaszx0
lukaszx0 / view_classes_proposal.md
Last active December 21, 2015 06:59
View Classes implementation proposal
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@lrytz
lrytz / z-automator.png
Last active February 4, 2023 21:20
Shortcut for Syntax Highlighting in Keynote
@brixen
brixen / shim.rb
Last active August 29, 2015 14:25
How to properly define a common interface across Ruby versions, engines and engine versions
# The goal is to define a common set of methods independent of Ruby version
# engine, and engine version to make other code more simple. The problem is:
# 1. the method may not be defined for the advertised Ruby version
# 2. the method may be defined but "shouldn't" be for that version
# 3. the method may not be defined and shouldn't be defined
# The conditional needs to account for these cases. If the method is not
# defined but should be for that Ruby version, that should be a hard error.
# If the method is defined but shouldn't be for that Ruby version, it may
# not be a compatible definition and that should be checked early rather
# than resulting in a confusing error later. Finally, if it's not defined
@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active May 10, 2024 15:05
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse