This file contains hidden or 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/sh | |
| set -e | |
| function download() { | |
| url=$1 | |
| base=$(basename $1) | |
| if [[ ! -e $base ]]; then | |
| echo "curling $url" | |
| curl -O -L $url |
This file contains hidden or 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
| desc "deploy", "deploys the site via LFTP to the location specified in the environment" | |
| def deploy | |
| load_ftp_configuration | |
| start_timestamp = Time.now.to_i | |
| if system("lftp -e 'mirror -R -v #{ENV['PUBLIC_DIRECTORY']} #{ENV['FTP_TARGET_DIRECTORY']}; bye' -u #{ENV['FTP_USER']},#{ENV['FTP_PASSWORD']} #{ENV['FTP_SERVER']}") | |
| puts "Deploy finished. (Duration: #{Time.now.to_i - start_timestamp} seconds)" | |
| else | |
| puts 'Deploy aborted, something went wrong.' |
This file contains hidden or 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 Jekyll | |
| class CategoryAwareNextGenerator < Generator | |
| safe true | |
| priority :high | |
| def generate(site) | |
| site.categories.each_pair do |category_name, posts| | |
| posts.sort! { |a, b| b <=> a } |
This file contains hidden or 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
| new MixpanelScrollTracker({ | |
| attribute: 'section', | |
| event: 'Scrolled to', | |
| markers: [ | |
| { position: 500, value: 'Services' }, | |
| { position: 700, value: 'About Us' }, | |
| { position: 900, value: 'Contact Form' } | |
| ] | |
| }); |
This file contains hidden or 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 = Ember.Application.create(); | |
| App.Project = Ember.Object.extend({ | |
| title: null, | |
| features: null, | |
| estimateSum: function() { | |
| var features = this.get('features'); | |
| return features.reduce( | |
| function(total, feature) { |
This file contains hidden or 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
| Tedian.ApplicationRoute = Ember.Route.extend | |
| setupController: -> | |
| controller = @controllerFor("sidebar") | |
| controller.set "tasks", @store.find("task") | |
| controller.set "projects", @store.find("project") | |
| controller.set "timeEntries", @store.find("timeEntry") | |
| Tedian.TimeEntry.findActive().then (timeEntry) -> | |
| controller.set "activeTimeEntry", timeEntry |
This file contains hidden or 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
| // The incorrect way of defining fixtures. | |
| var Post = DS.Model.extend({ | |
| title: DS.attr('string'), | |
| body: DS.attr('string') | |
| }); | |
| Post.FIXTURES = [ | |
| { id: 1, title: 'Title A', body: 'Body A' }, | |
| { id: 2, title: 'Title B', body: 'Body B' } | |
| ]; |
This file contains hidden or 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
| { | |
| name_de: 'A 22' | |
| start_of_production_de: 'ca. 10/1950' | |
| tractor_number_de: 'ab ca. 5000' | |
| number_of_produced_units_de: 'ca. 10.000' | |
| technical_label_de: 'R 18' | |
| wheelbase_de: '1500 mm' | |
| length_de: '2580 mm' | |
| chassis_clearance_de: '350 mm' | |
| width_de: '1520 mm' |
This file contains hidden or 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
| 06:25 Grow your application organically, don't make it complicated upfront. (Rails works good for the things it was designed for.) | |
| 08:55 What if we had more logic? | |
| 10:30 Lets pretend we want to seprate it | |
| 11:30 Even it’s very small logic lets pretend there is more here |
This file contains hidden or 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
| # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | |
| ishophaircare: | |
| name: ishophaircare | |
| slug: ishophaircare | |
| commission_level: 0 | |
| color: blue | |
| custom_commission_rate: 0 | |
| sale: true | |
| logo: <%= File.load("#{Rails.root}/test/fixtures/logo.png") %> |