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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
vows = require 'vows'
assert = require 'assert'
vows
.describe('Division by Zero')
.addBatch
'when dividing a number by zero':
topic: -> 42/ 0
@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": {
@0gust1
0gust1 / build.js
Last active November 5, 2016 22:18
metalsmith static website build, with livreload
var extname = require('path').extname;
var Metalsmith = require('metalsmith');
var myth = require('myth');
var http = require('http');
var templates = require('metalsmith-templates');
var markdown = require('metalsmith-markdown');
var watch = require('metalsmith-watch');
/**
@heathdutton
heathdutton / gist:cc29284de3934706acd1
Created April 26, 2015 03:19
Start an Acquia drush command, and wait for it to complete before continuing.
#!/bin/bash
# Runs an acquia task, and waits for the task to complete before continuing.
# This is a helper script, to be used in others as needed.
if [[ $1 = "" ]] || [[ $2 = "" ]]
then
echo "Runs an acquia drush command, waiting for the results before continuing."
echo "Can be used as a replacement for drush."
echo
echo " Usage: $0 <site-alias> <ac-drush-command>"
@spinus
spinus / config.nix
Created July 8, 2017 16:15
~/nixpkgs/config.nix
let
ver = "20170527";
in
{
allowUnfree = true;
allowBroken = true;
firefox = {
enableGoogleTalkPlugin = true;
enableAdobeFlash = true;
icedtea=true;
@vikramrojo
vikramrojo / design-ops-playbook.md
Created May 10, 2018 04:50
A collection of tools and practices to aide design organizations.

Design Operations

Within a product organization, a number of workflow and environmental factors affect the effectiveness and impact of design work. Design operations manages aspects of culture and process, allowing designers to focus on execution while expanding the range of design's scope.

Design operations tackles common product challenges like;

  • interface consistency
  • clarifying specification
  • user testing
  • developer handoffs

It addresses these factors by managing and communicating aspects of the design workflow like;

@swannodette
swannodette / FourteenBitCC.sc
Created August 4, 2020 09:44 — forked from carltesta/FourteenBitCC.sc
14-bit MIDI Handler for SuperCollider
FourteenBitCC {
/*
//Use Case:
MIDIIn.connectAll;
~x = FourteenBitCC.new("x", 72, 104);
~x.func = {|val| ("x: "++val).postln};
//MPE Example with Sensel Morph
MIDIIn.connectAll
#!/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