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
#!/usr/bin/env ruby | |
# gotta-clone-them-all, to clone all the github repositories of a user | |
# Copyright (C) 2013 Kerrick Long | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
# On the server | |
# Assuming the site is served from ~/www/example.com/ and you can hide the .git directory from public view | |
# Keep in mind that ^D is Control-D, or what ever the command is for your shell to stop input. | |
mkdir ~/www/example.com && cd ~/www/example.com | |
git init | |
git config core.worktree ~/www/example.com | |
git config receive.denycurrentbranch ignore | |
cat > .git/hooks/post-receive | |
#!/bin/sh | |
git checkout -f |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: '' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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
import Ember from 'ember'; | |
const FooMixin = Ember.Mixin.create({ | |
foo() { | |
alert('foo'); | |
} | |
}); | |
const obj = Ember.Object.extend(FooMixin).create(); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
value: false, | |
actions: { | |
toggle() { | |
this.toggleProperty('value'); | |
} | |
} | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: ['gets-classes-added'], | |
actions: { | |
addClass() { | |
const newClass = Math.random().toString().slice(2); | |
this.get('classNames').addObject(newClass); | |
} | |
} |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: ['gets-classes-added'], | |
classNameBindings: ['extraClassNames'], | |
setupExtraClasses: Ember.on('init', function() { | |
this.set('extraClasses', []); | |
}), | |
extraClassNames: Ember.computed('extraClasses', function() { | |
return this.get('extraClasses').join(' '); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
firstName: '', | |
lastName: '', | |
fullName: Ember.computed('firstName', 'lastName', function() { | |
const firstName = this.get('firstName'); | |
const lastName = this.get('lastName'); | |
if (firstName && lastName) { |