A future version of Ember will come with a new templating engine known as HTMLBars.
The original motivation for HTMLBars was to allow helpers and properties to have better contextual information about what they were bound to.
So for example, consider a template like this:
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 Babby < PragnentGirl::GetPragnent | |
attr_accessible :name, :mother, :location, :pragnent_girl_id | |
belongs_to :pragnent_girl | |
before_save :destroy_instain_mothers | |
after_save :pary_for_father | |
#How is babby formed? |
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
find ~ -name '*.log' -print0 | xargs -0 -L1 stat -f'%z %N' | sort -rn | tee fat-logfiles.txt | head | |
awk '{ total += $1 } END { printf "total: %5.2f MiB\n", total/1024/1024 }' < fat-logfiles.txt |
Re: On layout & web performance by Kelly Norton
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>#lazyweb Is there any documentation about which jQuery functions/effects trigger layout? re: kellegous.com/j/2013/01/26/l…
— Dave Rupert (@davatron5000) January 28, 2013
getWidthOrHeight()
used in jQuery.fn.width/height
clientLeft
- 3180 jQuery.event.mousehooks.filter
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
#!/bin/bash | |
git diff --cached -SNSLog --quiet | |
if [ $? -eq 1 ]; then | |
echo "NSLog call detected, indicating debug code is staged. Please unstage your debug code." | |
exit 1 | |
fi | |
exit 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
## The quick-and-nasty CVE-2013-0156 Heroku inspector! | |
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku | |
## Download and run using: | |
## ruby heroku-CVE-2013-0156.rb | |
`heroku list`.split("\n").each do |app| | |
app = app.strip | |
# Some "heroku apps" lines have === formatting for grouping. They're not apps. | |
next if app[0..2] == "===" |
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 String | |
def loch_ness_monster_case | |
self.split('::').collect do |section| | |
section.gsub(/([^\/])([A-Z])/, '\1_\2').downcase.split(/_/).collect { |part| | |
chars = part.split('') | |
half = chars.length/2 | |
chars[half].upcase! | |
chars[half - 1].upcase! | |
chars.join('') |