This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const Promise = require('bluebird'); | |
const _ = require('lodash'); | |
const redis = require('redis'); | |
const REDIS_SCAN_PAGES = 5; | |
const PAGE_SIZE = 20; | |
Promise.promisifyAll(redis.RedisClient.prototype); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## Setup the application: | |
// | |
// application.js | |
var BackboneApp, BA; | |
BackboneApp = BA = (function (Backbone, Marionette) { | |
var Application = Marionette.Application.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
save: (data, options = {}) -> | |
entity = @ | |
isNew = @isNew() | |
success = _.bind(@saveSuccess, @, isNew, options.collection, options.callback) | |
error = _.bind(@saveError, @) | |
promise = new Promise (resolve, reject) -> | |
_.defaults options, | |
wait: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Overview | |
# -------- | |
# The Match Making Service is called via a persisted socket connection | |
# from the Xbox (if possible). It works on an event driven system (event loop) | |
# rather than a threaded approach. This means we don't have to worry about locks, | |
# mutexes, and related bad things, but we do need to make sure we keep the | |
# execution time of the execution stacks in each event loop to a minimum. | |
# | |
# Approach | |
# -------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div id="container"> | |
<h1>Link to an External iOS App</h1> | |
<section class="static-tweet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html> | |
<?xml-stylesheet href='assets/css/content1.css' type='text/css' media='all'?> | |
<?xml-stylesheet href='assets/css/content1-paginated.css' type='text/css' media='paginated and (orientation:landscape)'?> | |
<?xml-stylesheet href='assets/css/content1-flow.css' type='text/css' media='nonpaginated and (orientation:portrait)'?> | |
<html xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ibooks="http://www.apple.com/2011/iBooks" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/> | |
<title>Untitled</title> | |
<link rel="stylesheet" type="text/xml+svg" href="assets/svg/content1.svg"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If there were *no* submission errors: | |
if ($err === 0) { | |
if (function_exists('htmlspecialchars_decode')) { | |
$subject = htmlspecialchars_decode($subject); | |
$message = htmlspecialchars_decode($message); | |
} | |
$message .= "\r\nPhoneNumber: " . $phone; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[default] Configuring and enabling network interfaces... | |
[default] Mounting shared folders... | |
[default] -- /webapp | |
[default] -- /vagrant | |
[default] Forcing shutdown of VM... | |
[default] Destroying VM and associated drives... | |
/Applications/Vagrant/embedded/gems/gems/vagrant-1.1.1/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:16:in `call': uninitialized constant VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings::Errors (NameError) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script> | |
(function() { | |
var d = document, | |
w = window, | |
de = d.documentElement, | |
os = w.applicationCache && w.JSON && w.localStorage, | |
om = window.operamini, | |
pe = 'pointerEvents' in de.style && !window.opera, // Opera gives false positive | |
bs = 'backgroundSize' in de.style && !om; // Opera Mini gives false positive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Conditionally load Google Analytics | |
if (!PAGE.inDevmode) { | |
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | |
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g,s)}(document,'script')); | |
} |
NewerOlder