- launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist (old way)
- brew services stop postgresql (new way)
- mv /usr/local/var/postgres /usr/local/var/postgres.old
- initdb /usr/local/var/postgres -E utf8
- pg_upgrade -b /usr/local/Cellar/postgresql/9.3.5_1/bin -B /usr/local/Cellar/postgresql/9.4.0/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres
- ./delete_old_cluster.sh (automatically generated in current directory)
- rm delete_old_cluster.sh
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
[] + [] | |
// returns an empty string, '' | |
[] + [0] | |
// returns a string, '0' | |
[0] + [0] | |
// returns a string, '00' | |
[0,0] + [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
Uncaught TypeError: Object #<Object> has no method 'addArrayObserver' ember.js:11360 | |
Ember.ArrayProxy.Ember.Object.extend._setupArrangedContent ember.js:11360 | |
Ember.ArrayProxy.Ember.Object.extend._arrangedContentDidChange ember.js:11350 | |
sendEvent ember.js:2428 | |
notifyObservers ember.js:2763 | |
Ember.propertyDidChange ember.js:2630 | |
iterDeps ember.js:2667 | |
dependentKeysDidChange ember.js:2651 | |
Ember.propertyDidChange ember.js:2628 | |
set ember.js:2850 |
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
App.Router.map -> | |
@route 'index', {path: "/#{short_name}"} | |
@route 'customList', {path: "/#{short_name}/custom-list/:list_name"} | |
@route 'multiLevelList', {path: "/#{short_name}/multi-level-list/:list_name/:list_level"} | |
App.EventController = Em.ObjectController.extend | |
goTo: (navbar_icon) -> | |
@transitionToRoute navbar_icon.route, navbar_icon.context | |
# Sample passed navbar_icon |
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
echo "alias gau='git update-index --assume-unchanged'" >> ~/.zshrc && echo "alias gac='git update-index --no-assume-unchanged'" >> ~/.zshrc |
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
server { | |
listen 80; | |
server_name tedera.com; | |
root /var/www/tedera/current/public; | |
passenger_enabled on; | |
if ($host = 'www.tedera.com') { | |
rewrite ^/(.*)$ http://tedera.com/$1 permanent; | |
} | |
} |
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 MealPlan < ActiveRecord::Base | |
attr_accessible :active | |
has_many :meals | |
before_save :check_for_active_plan | |
def check_for_active_plan | |
if MealPlan.active.nil? | |
if self.active == false | |
flash[:alert] = 'You must have at least one active Meal Plan' |
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
Fetching: libv8-3.3.10.4.gem (100%) | |
Building native extensions. This could take a while... | |
Building native extensions. This could take a while... | |
ERROR: Error installing therubyracer: | |
ERROR: Failed to build gem native extension. | |
/Users/ramiro/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb | |
checking for main() in -lobjc... yes | |
creating Makefile |
I'm trying to make a horizontal rainbow stripe background gradient mixin, but I feel like this is way too verbose. How can it be better?
Goals:
- Use variables for colors so they can be swapped out for different colors.
- The widths are hard coded for 8 colors. Can it be done smarter where it adjusts to the number of colors you add? Or is that asking too much?
- The colors are defined twice for the color starts and stops. Can this be done better?
- Right now I define the colors as variables at the top level, then pass them in the mixin. Should they instead be created inside the mixin and then colors are brought in as arguments? Or does that matter?