# Angular
$http.get({
url: '/api/search'
method: 'GET'
params:
filters:
a: 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
$scope.dateSt = moment(); | |
$scope.optionsSt = {}; | |
<mighty-datepicker ng-model="dateSt" options="optionsSt"></mighty-datepicker> |
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
$scope.markers = [ | |
{ | |
day: moment(), | |
marker: "tutoti" | |
}, | |
{ | |
day: moment().add('day', 2), | |
marker: "tutotite" | |
} | |
] |
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
_callthis = function(day) { | |
console.log("call this: ", day); | |
} | |
_filter = function (day) { | |
w = day.weekday(); | |
return w < 6 && w > 0; | |
} | |
$scope.multi = [moment(), moment().add('day', 2), moment().add('day', 5)]; |
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
$scope.date = null; | |
$scope.options = { | |
months: 1, | |
after: moment(), | |
template: template | |
}; | |
<mighty-datepicker ng-model="date" options="options"></mighty-datepicker> | |
<mighty-datepicker ng-model="date" options="options"></mighty-datepicker> |
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
<body ng-app="TestApp"> | |
<div ng-controller="TestCtrl"> | |
<div> | |
<h1>Simple date picker</h1> | |
<mighty-datepicker ng-model="date" options="options"></mighty-datepicker> | |
</div> | |
<div> | |
<h1>Multiple date picker</h1> | |
<mighty-datepicker ng-model="multi" options="optionsM"></mighty-datepicker> | |
</div> |
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
angular.module("TestApp", ["mightyDatepicker"]); | |
angular.module("TestApp").controller("TestCtrl", function($scope){ | |
_callthis = function(day) { | |
console.log("call this: ", day); | |
} | |
_filter = function (day) { | |
w = day.weekday(); | |
return w < 6 && w > 0; | |
} |
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
module API | |
class UsersController | |
# This will cause problems in exactly two years from now | |
def index | |
render json: User.all | |
end | |
# Writing it this way from the beginning will allow | |
# to extend this object when the requirements change | |
def index |
Bundler doesn't (and can't) bundle itself so
gem 'bundler', '>= 1.7.0'
isn't enough. Bundler must be updated manually locally and on each stage.
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
if filereadable("bin/rspec") | |
let g:vroom_spec_command = './bin/rspec --format=documentation' | |
else | |
let g:vroom_spec_command = 'rspec --format=documentation' | |
endif |