This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
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
var http = require('http'), | |
fileSystem = require('fs'), | |
path = require('path') | |
util = require('util'); | |
http.createServer(function(request, response) { | |
var filePath = 'path_to_file.mp3'; | |
var stat = fileSystem.statSync(filePath); | |
response.writeHead(200, { |
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
(function (window, document, $, undefined) { | |
var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
var defaults = { | |
selector: "#captcha", | |
text: null, | |
randomText: true, | |
randomColours: true, |
Hello,
If you reached this page, means you've hit this SSL error when trying to pull updates from RubyGems:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
This error is produced by changes in rubygems.org infrastructure, please
-
Other
- http://emberjs.jsbin.com/rwjblue/82/edit - Opening a window and communicate with it.
- http://emberjs.jsbin.com/rwjblue/55/edit - Using liquid-fire animations in globals mode.
- http://emberjs.jsbin.com/rwjblue/151/edit?js,output - Modify computed dependent keys after initialization.
-
POJO's
- http://emberjs.jsbin.com/rwjblue/139/edit?html,js - Defining computed properties on a POJO.
-
Routing
-
http://emberjs.jsbin.com/rolo/3 - Shows route hook ordering.
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
/* | |
* Working authentication with | |
* Firebase 2.0.x + Ember.js 1.8.1 + Ember Data Canary + EmberFire 1.3.0 + Ember CLI | |
* works for me! oskar@rough.dk | |
* | |
* Note: this assumes you've set up login on your Firebase, | |
* only handles Google and Facebook for now, | |
* | |
* In your templates: <button {{action 'login' 'google'}}>Log in with Google</button> | |
*/ |
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
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |
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
// app/controllers/sign-in.js | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
signIn(){ | |
this.set('errors', null); | |
var params = { identification: this.get('email'), password: this.get('password') }; | |
// Redirects to index route on success (configurable in config/environment.js) | |
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params); |
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
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: yourapp | |
# Required-Start: nginx | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: The main django process | |
# Description: The gunicorn process that receives HTTP requests | |
# from nginx |
OlderNewer