Skip to content

Instantly share code, notes, and snippets.

View locks's full-sized avatar
🌟
Ember Polaris

Ricardo Mendes locks

🌟
Ember Polaris
View GitHub Profile
@tomdale
tomdale / logger.js
Last active August 29, 2015 14:02
Excerpt of the formatted, hierarchical logger in Skylight
/*
Example usage:
import logger from "app/system/logger";
var LOG = logger.loggerFor("topic"');
LOG.log({
event: "data received",
secondary: {
resource: "photo",
# Make sure to do detection so it will gracefully downgrade like:
# begin
require 'psych'
Psych.add_domain_type(nil, 'code') { |_,hash|
p hash['ruby']
}
# rescue
# do 1.8 stuff
# end

Problem

JS-Interop is a significant feature of Clojurescript but as soon as you want to deploy your app you'll need extern files that enable advanced compilation features.

This is a blocker for people unfamiliar with the Closure compiler and for the Clojurescript community in general. Lots of time is wasted if everyone figures this out on his own.

@EndangeredMassa
EndangeredMassa / notes.md
Last active August 29, 2015 14:08
Running an Ember.js Workshop

Running an Ember.js Workshop

  • have visualizations for describing how nested and sibling UI elements map to URLs
  • provide prework to attendess
  • provide a premade starter application to attendees
  • check in node_modules
@elskwid
elskwid / const_get.rb
Last active August 29, 2015 14:10
Mustache .const_get! for locks
# Little work for the const_get functionality in Mustache for @locks
require "minitest/autorun"
module Single
end
module Nested
module Nested
module Deep
end
anonymous
anonymous / stabilize_tests.diff
Created December 2, 2014 00:54
commit 1b54e70da6253737ab09653e6dfaf1c0599b38ce
Merge: 179537c afd9411
Author: Ryan Davis <ryand-ruby@zenspider.com>
Date: Mon Dec 1 16:27:27 2014 -0800
WIP on test_fixes: 179537c Merge pull request #147 from mdavidn/fix_const_get
diff --cc test/autoloading_test.rb
index 6d9ca6e,6d9ca6e..a04f7b5
--- a/test/autoloading_test.rb

Major points:

  • Let's us the the route:application outside of code samples instead of App.ApplicationRoute
  • We should think about using some special CSS or other markup instead of comments at the top of every file.
  • We considered combining the guides on views and components
  • Pull requests should be opened on emberjs/guides, not emberjs/website
@vangberg
vangberg / app.rb
Created February 8, 2009 14:34
file upload w/ sinatra
require 'rubygems'
require 'sinatra'
get '/' do
@files = Dir['public/*'].map {|f| File.basename(f) }
erb :index
end
post '/upload' do
filename = params[:file][:filename]
#! /usr/bin/python
# flixel (the script) is based on Adam Atomic's 'flx.py' script for
# creating various flixel-related objects in a fresh Flex Builder project.
# flixel (the script) changes the python path to be appropriate for Mac OS,
# generates any needed directories on its own behalf,
# relies on an environment variable (FLIXEL_HOME/lib) to locate flixel's org/...
# directory, and generates a Makefile for use with mxmlc. this behavior can be
# turned off by flipping flexBuilder back to true. it assumes mxmlc is in PATH.
# flixel (the script) also supports a three-argument version like so:
By elasped time
+---------------------------+-----------+-----+------+-------+--------+-----------+-----------+
| Name | Start Mem | 100 | 1000 | 10000 | 100000 | Final Mem | Time |
+---------------------------+-----------+-----+------+-------+--------+-----------+-----------+
| ricardo_mendes_refactored | 10292 | 20 | 20 | 696 | 4420 | 14712 | 0.228459 |
| ali_rizvi | 10784 | 56 | 404 | 2568 | 31824 | 42608 | 0.323051 |
| ali_rizvi_fixed_inc | 9380 | 44 | 236 | 2096 | 32744 | 42124 | 0.370307 |
| ali_rizvi_fixed | 10048 | 56 | 428 | 2092 | 32100 | 42148 | 0.371651 |
| alberto_fernandez_capel | 10764 | 36 | 364 | 888 | 6288 | 17052 | 0.618822 |
| tj_singleton_refactored | 8232 | 20 | 300 | 828 | 16676 | 24908 | 0.733384 |