Skip to content

Instantly share code, notes, and snippets.

Thijs van der Vossen tvandervossen

Block or report user

Report or block tvandervossen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LinnStrument.control.js
loadAPI(1);
host.defineController("Roger Linn Design", "LinnStrument", "1.0", "B7DD06CB-63BA-4902-879E-050B09D3058F");
host.defineMidiPorts(1, 1);
host.addDeviceNameBasedDiscoveryPair(["LinnStrument MIDI"], ["LinnStrument MIDI"]);
function init()
{
host.getMidiInPort(0).setMidiCallback(onMidi);
View tilt.js
// On iPhone and iPod Touch we add a nice dynamic 3D parallax effect by
// updating the perspective origin depending on device tilt.
if (/iPhone|iPod/.test(navigator.platform) && 'ondevicemotion' in window) {
;(function() {
var value,
element = $('div.doors ul').get(0),
values = {x: [0,0,0], y: [0,0,0]}, // Keep the 3 most recent values.
index = 0,
choices = { // Lookup table to normalize based on device orientation.
x: {'0': ['x', -1], '90': ['y', 1], '180': ['x', 1], '-90': ['y', -1]},
@tvandervossen
tvandervossen / stimulus_notes.md
Last active May 5, 2018
Quick guide for people who want to add stimulus.js to a Rails 5.2 app but who haven’t used much Modern JavaScript
View stimulus_notes.md

How to add stimulus.js to a Rails 5.2 app

This might also work or Rails 5.1, but I haven’t tried that yet.

Add the webpacker gem to your Gemfile:

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'

Then run (assuming you’re on macOS and using Homebrew):

@tvandervossen
tvandervossen / stimulus_notes.md
Created Apr 11, 2018
Quick guide to add stimulus.js to a Rails 5.2 app if you haven’t used much Modern ™ JavaScript before
View stimulus_notes.md

Add stimulus.js to a Rails 5.2 app

According to https://github.com/rails/webpacker you should:

Add the webpacker gem to your Gemfile:

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'

Then run (assuming you’re on macOS and using Homebrew):

@tvandervossen
tvandervossen / gist:50897e4c0ad40b162b033da1f17b7867
Created Mar 10, 2018
Trying to understand the motivation behind the BEM class naming convention
View gist:50897e4c0ad40b162b033da1f17b7867
In https://css-tricks.com/bem-101/ the following CSS is given as an exampke:
/* Block component */
.btn {}
/* Element that depends upon the block */
.btn__price {}
/* Modifier that changes the style of the block */
.btn--orange {}
@tvandervossen
tvandervossen / read_any_encoding.rb
Created May 22, 2017
Read and convert any text file to UTF-8 in Ruby
View read_any_encoding.rb
require 'tedrahcu'
data = IO.binread(path)
encoding = Tedrahcu.detect(data)
data.force_encoding(encoding).encode!('UTF-8', invalid: :replace, undef: :replace, replace: '', universal_newline: true)
View release_notes.md

Ons Medicatiecontrole versie 0.9.1

Controleverzoeken worden nu bij voorkeur aan collega’s binnen je team toegewezen.

Daarnaast zijn er een aantal verbeteringen gedaan aan de performance en stabiliteit. Daarnaast zijn de volgende specifieke problemen verholpen:

  • Op sommige apparaten kwam de preview bij het maken van de foto niet helemaal overeen met de uiteindelijk gemaakte foto. Dit probleem is verholpen, de preview bij het maken van een foto zou nu ook altijd vierkant moeten zijn.
  • Bij het bekijken van een controle in het dossier van de client op Internet Explorer 11 werden de foto’s niet weergegeven. Dit zou nu ook in Internet Explorer 11 moeten werken.
  • Na het updaten of opnieuw installeren neemt de app nu de huidige beschikbaarheid over van de server.
View Books for design and development students
Mindset: The New Psychology of Success - Carol Dweck
Test Driven Development: By Example - Kent Beck
Implementation Patterns - Kent Beck
Wim Crouwel in his own words (http://www.lauwenprojects.com/projects.asp?id=114)
Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability - Steve Krug
Badass: Making Users Awesome - Kathy Sierra
Thinking with Type: A Critical Guide for Designers, Writers, Editors, & Students - Ellen Lupton
The Vignelli Canon - Massimo Vignelli (http://www.vignelli.com/canon.pdf)
Stop Stealing Sheep & Find Out How Type Works - Erik Spiekermann, E.M Ginger
Mental Models - Indi Young
View gist:b78c69be10e94b5b1b2e
;(function() {
var size, width = 1024, step = 64, selector, out = '', style = document.createElement('style')
for (size = 15; size < 32; size++) {
out += '@media (min-width: ' + width +'px) and (min-height: ' + (width * 0.7) +'px) {'
out += ' body, input, button, textarea { font-size: ' + size + 'px; }'
out += ' .column { max-width: ' + (width + step) + 'px; }'
out += ' }'
width += step
}
style.innerHTML = out
@tvandervossen
tvandervossen / gist:5d857b7908054df3b553
Last active Oct 23, 2015
Cancel Adobe CC subscription
View gist:5d857b7908054df3b553
General Info
Chat start time Oct 23, 2015 3:51:34 AM PST
Chat end time Oct 23, 2015 4:09:20 AM PST
Duration (actual chatting time) 00:17:45
Operator Anurag
Chat Transcript
info: Hi, we are currently helping other customers in line ahead of you. We'll be with you as soon as possible.
You can’t perform that action at this time.