Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| <?php | |
| // Use in the "Post-Receive URLs" section of your GitHub repo. | |
| if ( $_POST['payload'] ) { | |
| shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
| } | |
| ?>hi |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
This is a deconstuction of matematikaadit's submission to therubygame challenge 5; 'Roman numerals. What are they good IV?'. The goal of the challenge is to take a string representing a roman numeral as input and return the integer that the numeral represents.
matematikaadit currently has the honour of the shortest (by character count) submission for this challenge. At first glance I didn't understand how it worked so I re-wrote and analyzed it until I did.
matematikaadit's original submission:
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| <!-- copy this to YOUR_THEME.tmTheme--> | |
| <dict> | |
| <key>name</key> | |
| <string>diff: deleted</string> | |
| <key>scope</key> | |
| <string>markup.deleted</string> | |
| <key>settings</key> | |
| <dict> | |
| <key>background</key> | |
| <string>#EAE3CA</string> |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| // | |
| // To be used like this: | |
| // | |
| // | |
| // {{debounced-input | |
| // placeholder="1000000" | |
| // value=propertyName | |
| // debounceWait=300 <-- debounce wait value | |
| // fireAtStart=false <-- corresponds to Ember.run.debounce’s 4th param, if false, will run at the end of wait period | |
| // class="form-control" <-- all regular text input attributes work |
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
Ember.Controller instead of Ember.ArrayController or Ember.ObjectControllerEmber.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.| // app/transforms/array.js | |
| import Ember from 'ember'; | |
| import DS from 'ember-data'; | |
| export default DS.Transform.extend({ | |
| deserialize: function(value) { | |
| if (Ember.isArray(value)) { | |
| return Ember.A(value); | |
| } else { | |
| return Ember.A(); |