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
FROM spurin/hexo | |
WORKDIR /app | |
COPY package.json yarn.lock ./ | |
RUN yarn install | |
EXPOSE 4000 | |
CMD ["yarn", "start"] |
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
# Usage: | |
# APP-1337 $ commit 'foo' | |
# > 'APP-1337: foo' | |
function commit { | |
local message=$1 | |
local branch=$(git symbolic-ref HEAD) | |
local regex="([A-Z]+-[0-9]+)" | |
if [[ $branch =~ $regex ]] | |
then |
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({ | |
items: Ember.computed('model.@each.{hostname,port}', function() { | |
return JSON.stringify(this.get('model')); | |
}), | |
actions: { | |
addItem() { | |
this.get('model').pushObject({}); | |
}, |
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
Ember.Component.extend({ | |
computed: Ember.computed(() => { | |
this.foo(); | |
}) | |
}) | |
// ...transpiles to... | |
/* | |
var _this = undefined; |
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
export default Ember.Component.extend({ | |
init() { | |
this._super(); | |
this.get('item').on('saved', this.itemSaved.bind(this)); | |
}, | |
itemSaved() { | |
this.$().css({ color: 'deeppink' }); | |
} | |
}); |
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
/* This is bad, as it doesn't allow values to cascade. */ | |
* { | |
box-sizing: border-box; | |
font-weight: 500; | |
/* ... */ | |
} | |
/* This is good. Do this instead. */ |
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
.container { | |
display: table; | |
} | |
.container input { | |
display: table-cell; | |
} |
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
* { padding: 0; margin: 0; } | |
p { | |
border: 1px solid #eee; | |
line-height: 24px; | |
overflow: hidden; | |
margin: 30px; | |
padding: 5px; | |
} |
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
div { | |
border-radius: 50px; | |
color: #f0f; | |
font-size: 128px; | |
text-align: center; | |
margin: 0 auto; | |
padding: 0 0 24px; | |
position: relative; | |
width: 200px; | |
} |
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
span { display: none; } | |
div:hover span { display: inline; } |
NewerOlder