Skip to content

Instantly share code, notes, and snippets.

;;; .emacs written by NAGATA Hiroaki (handlename.net)
(add-to-list 'load-path "~/.emacs.d/site-lisp/")
(require 'cl)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

vows = require 'vows'
assert = require 'assert'
vows
.describe('Division by Zero')
.addBatch
'when dividing a number by zero':
topic: -> 42/ 0
@io41
io41 / paginated_collection.js
Created February 22, 2011 10:10 — forked from zerowidth/paginated_collection.js
Pagination with Backbone.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
@mhawksey
mhawksey / gist:1170597
Created August 25, 2011 13:02
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
@alaingilbert
alaingilbert / main.js
Created September 14, 2011 20:24
Nodejs Crawler
// Intallation:
// npm install jsdom jquery
var jsdom = require('jsdom');
jsdom.env('http://google.ca/', null, function (err, window) {
$ = require('jquery').create(window);
$('a').each(function () {
console.log($(this).attr('href'), ' ---> ', $(this).text());
});
@zazi
zazi / HAL to JSON-LD
Created January 8, 2012 18:41
A rough JSON-LD serialisation of the HAL example at https://gist.github.com/572481
{
"@context": {
"ex": "http://example.com",
"ex:customer": {
"@type": "@id"
},
"ex:quantity": {
"@type": "xsd:integer"
},
"ex:price": {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 8, 2024 07:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pascalpoitras
pascalpoitras / config.md
Last active May 7, 2024 14:03
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select