View nginx.conf
1 2 3 4 5 6 7 8 9
# Puma upstream
upstream puma {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
 
# for UNIX domain socket setups:
server unix:/mnt/project/api/shared/tmp/sockets/puma.sock fail_timeout=0;
}
View queue_select.rb
1 2 3 4 5 6 7 8 9 10
require 'thwait'
 
# Synchronous hand-off between two threads.
# Both threads will block until a transfer is successful.
class Rendevous
def initialize
@mutex = Mutex.new
@send_flag = ConditionVariable.new
@recv_flag = ConditionVariable.new
@container = []
View app.js
1 2 3 4 5 6 7 8 9 10
// MIT: http://opensource.org/licenses/MIT
 
angular.module('app', []);
 
angular.module('app').controller
( 'MainCtrl'
, function($scope,$locale) {
$scope.currentYear = new Date().getFullYear()
$scope.currentMonth = new Date().getMonth() + 1
$scope.months = $locale.DATETIME_FORMATS.MONTH
View angular.html
1 2 3 4
<div ng-app ng-controller="Controller">
<input ng-model="myCheck" type="checkbox" />
<input ng-show="myCheck" type="text">
</div>
View input-chosen-ember-component.js
1 2 3 4 5 6 7 8 9 10
App.InputChosenComponent = Ember.Component.extend({
init: function () {
this._super();
},
 
// settings
labelClass: 'col-sm-2',
label: 'Date',
inputContainerClass: 'col-sm-2',
inputClass: '',
View title.js
1 2 3 4 5 6 7 8 9 10
App.SelectWithOptgroups = Ember.Select.extend({
// A version of Ember.Select that supports optgroup tags.
// content can contain objects that represent the options or the optgroups
// Example of an optgroup object:
// Ember.Object.create({
// optgroup_label: 'foo',
// content: [Ember.Object.create({label: 'First Name', value: 'first_name'}), Ember.Object.create({label: 'Last Name', value: 'last_name'})]
// })
defaultTemplate: Ember.Handlebars.compile('{{#if view.prompt}}<option>{{view.prompt}}</option>{{/if}}{{#each view.content}}{{#if optgroup_label}}<optgroup {{bindAttr label="optgroup_label"}}>{{#each content}}{{view Ember.SelectOption contentBinding="this"}}{{/each}}</optgroup>{{else}}{{view Ember.SelectOption contentBinding="this"}}{{/if}}{{/each}}'),
options: function() {
View form.handlebars
1 2 3 4 5 6 7 8 9 10
{{view Ember.GroupedSelect
groupedContentBinding="App.groupedServiceCodes"
contentBinding="App.flattenedServiceCodes"
selectionBinding="service_code"
optionLabelPath="content.description"
optionValuePath="content.id"
}}
 
<!-- groupedServiceCodes is an array of Ember.Objects with a label, and content -->
<!-- flattenedServiceCodes is the content arrays from groupedServiceCodes concatted together so they have the same order as the select -->
View nginx.conf
1 2 3 4 5 6 7 8 9 10
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
View chosen.jquery.js
1 2 3 4 5 6 7 8 9 10
// Chosen, a Select Box Enhancer for jQuery and Prototype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 1.0.0
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
 
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `grunt build`, do not edit it by hand.
(function() {
View ember_chosen.js
1 2 3 4 5 6 7 8 9 10
App.Chosen = Ember.Select.extend({
 
multiple: false,
width: '95%',
disableSearchThreshold: 10,
searchContains: true,
attributeBindings:['multiple', 'width', 'disableSearchThreshold', 'searchContains'],
 
didInsertElement: function(){
this._super();
Something went wrong with that request. Please try again.