Skip to content

Instantly share code, notes, and snippets.

@quasor
quasor / jsont.js
Created May 20, 2020 04:51 — forked from jonathanlurie/jsont.js
Serialize/deserialize json and conserve typed arrays
/*
Author: Jonathan Lurie - http://me.jonathanlurie.fr
License: MIT
The point of this little gist is to fix the issue of losing
typed arrays when calling the default JSON serilization.
The default mode has for effect to convert typed arrays into
object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be
Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an
object, there is no way to get it back in an automated way!
@quasor
quasor / Welcome file.md
Last active February 22, 2019 21:24
Welcome files

Welcome to StackEdit!

Hi! I'm your first Markdown file in StackEdit. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.

Files

Foo

header 3

header 4

Make some text

@quasor
quasor / foo
Created November 24, 2013 21:49
test
@quasor
quasor / foo
Created November 24, 2013 21:48
test
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jorgen Orehoj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@quasor
quasor / ss.rb
Created November 4, 2012 19:48
Mac OS X Screenshot to Dropbox
require 'securerandom'
require 'rb-fsevent'
require 'terminal-notifier'
DROPBOX_USER_ID = <YOURID>
fsevent = FSEvent.new
fsevent.watch "/Users/#{ENV['USER']}/Desktop" do |directories|
puts "Detected change inside: #{directories.inspect}"
filename = Dir['*.png'].first
if filename
n = SecureRandom.hex
Using the default profile...
uninitialized constant RSpec::Rails::TestUnitAssertionAdapter (NameError)
/Users/andrew/source/express/spec/support/integration_example_group.rb:12:in `<module:IntegrationExampleGroup>'
/Users/andrew/source/express/spec/support/integration_example_group.rb:8:in `<module:Rails>'
/Users/andrew/source/express/spec/support/integration_example_group.rb:7:in `<top (required)>'
/Users/andrew/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.2/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Users/andrew/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.2/lib/cucumber/runtime/support_code.rb:158:in `load_file'
/Users/andrew/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.2/lib/cucumber/runtime/support_code.rb:61:in `block in load_files!'
/Users/andrew/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.2/lib/cucumber/runtime/support_code.rb:60:in `each'
/Users/andrew/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.2/lib/cucumber/runtime/support_code.rb:60:in `load_files!'
Feature: Manage users
In order to use website
As a guest
I want to create an account
Scenario: Register new user
Given I am on the new user page
When I fill in "Email" with "email 1"
And I press "Create"