Skip to content

Instantly share code, notes, and snippets.

@alecperkins
alecperkins / TodoMVC.TodoApp.coffee
Created August 15, 2012 19:57
TodoMVC tutorial in coffeescript
TodoMVC.module 'TodoApp', (App, TodoMVC, Backbone, Marionette, $, _) ->
log arguments
class App.TodoForm extends Marionette.ItemView
events:
'keypress #new-todo' : 'createOnEnter'
'click .mark-all-done' : 'toggleAllClicked'
triggers:
'click .todo-clear a' : 'clear:completed'
@qwcode
qwcode / gist:3088149
Created July 11, 2012 05:14
non-recursive force upgrade

Upgrading a package, w/o upgrading dependencies that are already satisifed

suppose the following packages: a, b, c, d

with the following dependency relationships between their versioned distributions

  • a-1
  • b
@Aissen
Aissen / gist:2925633
Created June 13, 2012 18:20
Linux users: watch out for last-gen Intel Atom

Linux users: watch out for last-gen Intel Atom

Oops. They did it again.

It hit the market during the last few weeks. Last generation of Intel Atoms: CedarView (D2300, D2500, D2550, D2600, D2700) and Cedar Trail (N2600, N2700, N2800) SoCs integrate a PowerVR GPU from Imagination instead of the usual Intel GPU. If you remember the Poulsbo fiasco, it's the same. More or less.

An unsupported graphic card on Linux distributions, and which can't properly support a basic desktop environnment like Unity or Gnome 3.

To prevent this issue, Intel woke up MeeGo from the dead in last february [to add support for CedarView]

@hrldcpr
hrldcpr / tree.md
Last active April 26, 2024 08:53
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@tpryan
tpryan / ribbon.html
Last active April 11, 2024 00:21
Github Ribbon in CSS.
<!--
Copyright (c) 2012 Terrence Ryan
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
@michaelt
michaelt / latex.template
Created June 9, 2011 21:23
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.