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 destaque = $("#slide-container").destaque({ | |
itemSelector: ".item", | |
itemBackgroundSelector: ".background", | |
itemForegroundElementSelector: ".foreground .element", | |
controlsSelector: "#slide-pagination a", | |
onPageUpdate: function(destaque, pageData) { | |
$(".indicator .bullet").removeClass("active"); | |
$(".indicator .bullet[rel='"+ pageData.currentSlide +"']").addClass("active"); | |
} | |
}); |
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
.item img, .item .foreground { | |
-webkit-transform: translate3d(0, 0, 0); | |
transform: translate3d(0, 0, 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
$("#slide-container").destaque({ | |
autoSlideDelay: 10000, | |
resumeSlideDelay: 10000, | |
onInit: function(instance) { | |
instance.pause(); | |
}, | |
onResume: function(instance) { | |
instance.pause(); | |
} | |
}) |
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
package str | |
func Reverse(input string) string { | |
rune_array := []rune(input) | |
size := len(rune_array) - 1 | |
result := make([]rune, size + 1) | |
for i := 0; i <= size; i++ { | |
result[size - i] = rune_array[i] | |
} |
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 HtmlbarsCompiler = require('ember-cli-htmlbars') | |
var templateTree = new HtmlbarsCompiler('../app/templates', { | |
isHTMLBars: true, | |
// provide the templateCompiler that is paired with your Ember version | |
templateCompiler: require('components-ember/ember-template-compiler.js') | |
}); | |
templateTree.processString(source, templatePath) |
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
// jquery.js | |
import jQuery from 'jquery/dist/jquery.min' | |
window.jQuery = jQuery | |
// ember.js | |
import './jquery' | |
import 'components-ember/ember.min' | |
export default window.Ember | |
// webpack alias |
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 | |
│ ├── components | |
│ ├── controllers | |
│ ├── helpers | |
│ ├── routes | |
│ ├── services | |
│ ├── templates | |
│ ├── router.js | |
│ └── index.js |
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
# ... | |
Gem::Specification.new do |spec| | |
# ... | |
if RUBY_PLATFORM =~ /java/ | |
spec.platform = 'java' | |
spec.add_dependency 'activerecord-jdbcpostgresql-adapter' | |
else | |
spec.add_dependency 'pg' | |
end | |
end |
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
# Gemfile | |
platforms :ruby do | |
gem 'byebug' | |
end | |
platforms :jruby do | |
gem 'pry' | |
end |
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
class MyHandler | |
include PhobosDBCheckpoint::Handler | |
def consume(payload, metadata) | |
my_event = JSON.parse(payload) | |
# <-- your logic (which possibly skips messages) here | |
ack(my_event['id'], Time.now) | |
end | |
end |