Skip to content

Instantly share code, notes, and snippets.

@alecwhittington
alecwhittington / PropertyConvention.cs
Created June 16, 2011 15:20
Fluent NHibernate - Data Annotation Conventions
namespace YourProjectName.Here.NHibernateMaps.Conventions
{
using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using DataAnnotationsExtensions;
using FluentNHibernate.Conventions.Instances;
@chriseidhof
chriseidhof / nsincrementalstore.markdown
Created February 18, 2012 16:39
Accessing an API using CoreData's NSIncrementalStore

Accessing an API using CoreData's NSIncrementalStore

Note: the original location of this article is on my blog, however, it is posted here too for better readability.

In this article, we will see how to use Core Data for accessing your API. We will use the Bandcamp API as our running example. I've only been experimenting with this code for a few days, so there might be mistakes in there.

@JerrySievert
JerrySievert / gist:3119325
Created July 16, 2012 00:08
Working Node.js on Raspberry Pi
These instructions should be deprecated at this point.
Start following https://github.com/TooTallNate/node/tree/pi for a more straightforward node installation on the pi.
----
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages
@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
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
http://www.stylusmagazine.com/articles/weekly_article/constructing-manchester.htm
"Or even New Order’s “Blue Monday,” a song that owes much to Kilburn and Williams’ development—a pulsing, breathing pop classic fashioned primarily from cold, artificial parts: a vocoder, an Oberheim DMX drum machine, a Moog Source synthesizer, and a homemade Powertran sequencer"
http://www.electricity-club.co.uk/html/int_morris.html
Everyone talks about Everything's Gone Green being a sequencer number but it wasn't really?
No, with Everything's Gone Green, you had a Moog Source doing a 1/16th pulse and the Quadra doing the "da-dah, da-da-dah". Then what you'd do is take the 'CV' out of the Quadra and take that into the Moog so that the Moog is playing a different rhythm but following the pitch of the other thing. That's what we used for Temptation as well.
STEPHEN MORRIS Photo by Glenn A Baker
So the track that eventually became Video 586 was your turning point into actually using a sequencer?
@austinhyde
austinhyde / js-observables-binding.md
Last active August 16, 2023 18:19
Vanilla JavaScript Data Binding

Observables

You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:

var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }

console.log(getN()); // 5

setN(10);

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@cwensley
cwensley / MyValidationDialog.cs
Created February 2, 2016 21:23
Example of how to validate the input of controls on an Eto.Forms dialog.
using System;
using System.Collections.Generic;
using System.Linq;
using Eto.Forms;
using Eto.Drawing;
namespace MyValidationApp
{
// base validator that can be extended to do custom validation
public class ControlValidator
@MarcusFelling
MarcusFelling / VSTS_CreateReleasePullRequest.ps1
Last active September 9, 2021 13:01
Uses the VSTS REST API to create pull request
<#
.SYNOPSIS
Uses the VSTS REST API to create pull request
.DESCRIPTION
This script uses the VSTS REST API to create a Pull Request in the specified
repository, source and target branches. Intended to run via VSTS Build using a build step for each repository.
https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pull-requests
.NOTES