Skip to content

Instantly share code, notes, and snippets.

View pyykkis's full-sized avatar

Jarno Keskikangas pyykkis

  • Subtle Insights Oy
  • Finland
View GitHub Profile
@andrealbinop
andrealbinop / setup-modernie-vagrant-boxes.md
Last active May 28, 2023 01:54
Setup modern.ie vagrant boxes

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites

@japsu
japsu / README.md
Last active February 9, 2022 21:34
ARCHIVED: How to get NumPy and SciPy working in a virtualenv under Mac OS X

ARCHIVED: How to get NumPy and SciPy working in a virtualenv under Mac OS X

Please don't use this method any more, this is ages old (2014, Python 2.7).

Assuming you use virtualenv for Python library hygiene. Now you want Numpy and Scipy in your project.

NumPy and SciPy can not be easily installed under Mac OS X with a simple

pip install scipy
@nnarhinen
nnarhinen / navigation.cljs
Created October 1, 2013 22:17
Some experimental code for navigation handling with core.async
(ns myapp.main
(:require [jayq.core :refer [on $] :as j]
[cljs.core.async :as async
:refer [<! chan put!]]
[crate.core :as crate])
(:require-macros [cljs.core.async.macros :as m :refer [go alt!]]
[crate.def-macros :refer [defpartial]]))
(def $container ($ :.main-container))
@nnarhinen
nnarhinen / server.js
Last active December 21, 2015 22:19
Automatically keep your backbone models up-to-date via web sockets by listening to couchdb changes feed
var db = new (require('cradle').Connection)().database('my_db');
db.info(function(err, result) {
var seq = result.update_seq;
db.changes({since: seq, include_docs: true}).on('change', function(change) {
if (change.doc && change.doc.owner) {
io.sockets.in(change.doc.owner).emit('change:' + change.doc.type, decorate(change.doc));
}
});
});
module ConcurrencyExamples where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import Control.Applicative
import System.Random
example1 :: IO ()
example1 = do
@nnarhinen
nnarhinen / form-helper-spec.js
Last active December 11, 2015 01:39
A simple helper to bind input values to Backbone models. Hint: use Transparency.js for rendering
define(['chai-helper', 'helpers/form-helper', 'backbone', 'jquery'], function(expect, FormHelper, Backbone, $) {
'use strict';
var tmpl = '<div> \
<div data-context="model"> \
<input type="text" data-bind="name" class="name"> \
<input type="text" data-bind="percent" class="percent" data-factor="0.01" > \
<input type="checkbox" data-bind="is_enabled" class="check"> \
<input type="checkbox" data-bind="is_private" class="check2"> \
<div data-context="bind:embedded"> \
<textarea class="memo" data-bind="memo"> \
@jckarter
jckarter / factor-modules.md
Created August 23, 2012 19:57
Factor modules design

A package system for Factor

Factor's current module system and development model is heavily monolithic, reflecting Factor's history as a small-scale hobby project. The default settings encourage development within the Factor source tree and make it difficult to accommodate packaged read-only installations or projects developed outside of the source tree. Altering the module search path to accommodate these use cases is currently a manual and error-prone process. This proposal describes a new model for module lookup and installation with the following improvements:

  • a standardized search path for modules, allowing for global, user-local, project-local, and
@lucasallan
lucasallan / install_postgis_osx.sh
Created September 6, 2011 21:03 — forked from klebervirgilio/install_postgis_osx.sh
Installing PostGIS on Mac OS X and Ubuntu
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
var mongoose = require('mongoose');
var db = mongoose.connect('mongodb://localhost/mydb');
var Schema = mongoose.Schema;
var Posts = new Schema({
name : String,
subject: String,
comment : String,
password: String,
});
/*!
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron
*