Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
References:
Basic Optimization Rules
# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"
| <!doctype html> | |
| <html amp lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script async src="https://cdn.ampproject.org/v0.js"></script> | |
| <title>Hello, AMPs</title> | |
| <link rel="canonical" href="http://example.ampproject.org/article-metadata.html" /> | |
| <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
| <script type="application/ld+json"> | |
| { |
| (function(){ | |
| jQuery("img").each(function() { | |
| var h, w, x, y, m, i; | |
| h = this.height; | |
| w = this.width; | |
| l = Math.ceil(jQuery(this).offset().left) + 5; | |
| t = Math.ceil(jQuery(this).offset().top); | |
| jQuery('section').css('position', 'relative'); |
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
| $(function() { | |
| // Here you register for the event and do whatever you need to do. | |
| $(document).on('data-attribute-changed', function() { | |
| var data = $('#contains-data').data('mydata'); | |
| alert('Data changed to: ' + data); | |
| }); | |
| $('#button').click(function() { | |
| $('#contains-data').data('mydata', 'foo'); | |
| // Whenever you change the attribute you will user the .trigger |
| function TimeTracker(){ | |
| console.time("MyTimer"); | |
| for(x=5000; x > 0; x--){} | |
| console.timeEnd("MyTimer"); | |
| } |