Skip to content

Instantly share code, notes, and snippets.

View BFalkner's full-sized avatar

Brennan Falkner BFalkner

View GitHub Profile
> this._pendingFetch instanceof Ember.Map
true
> this._pendingFetch.keys.list
[(subclass of DS.Model), "type"]
> this._pendingFetch.values
Object {ember249: Array[1], st269: "value"}
> this._pendingFetch.forEach(function(k, v) { console.debug(k, v); })
[Object, _super: function, nextObject: function, firstObject: undefined, lastObject: undefined, contains: function…] (subclass of DS.Model)
value type
undefined
file added adapters/.unison.session.js.0fdafcf26b5d53a778ebfb5b50061b12.unison.tmp
file changed adapters/.unison.session.js.0fdafcf26b5d53a778ebfb5b50061b12.unison.tmp
file changed adapters/.unison.session.js.0fdafcf26b5d53a778ebfb5b50061b12.unison.tmp
Build successful - 7217ms.
Slowest Trees | Total
-------------------------------+----------------
TreeMerger (stylesAndVendor) | 1701ms
StaticCompiler | 1646ms
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@BFalkner
BFalkner / example.emblem
Last active December 31, 2015 00:39
Ember and Bootstrap Popup
popup-link value="Click Me" placement="bottom"
| Hey there.
a click="hide target='popover'" href="#" Close
var // Static reference to slice
sliceDeferred = [].slice;
/* $.when that waits for everything to return before failing */
function whenAll( firstParam ) {
var args = sliceDeferred.call( arguments, 0 ),
i = 0,
length = args.length,
pValues = new Array( length ),
count = length,
> _.split([1, 2, 3, 4], function(item) { return [item, item*2]; })
[1, 2, 2, 4, 3, 6, 4, 8]
@BFalkner
BFalkner / Salesforce.js
Created February 24, 2012 19:14
JavaScript has bad functional/monadic syntax.
{
_ajax: function(path, method, data, retry) {
var self = this;
var response = self._session.pipe(function(session) {
return $.ajax({
type: method || "GET",
url: SalesForceSettings.proxyUrl,
cache: false,
processData: false,
<!DOCTYPE html>
<html>
<head>
<title>Template Test</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0.beta2/handlebars.min.js"></script>
<script type="text/javascript">
$(function() {
$("script[type='text/x-handlebars-template']").each(function(i, el) {
var source = $(el).data("source");
@BFalkner
BFalkner / baton.cs
Created January 17, 2012 04:00
An awful bug. Connect throws if no Wiimote is present.
class Baton : IBaton {
private static Wiimote wiimote;
public Baton() {
if (wiimote == null) {
wiimote = new Wiimote();
wiimote.Connect();
wiimote.SetReportType(InputReport.IRAccel, true);
wiimote.SetLEDs(false, false, false, false);
}