Try to use existing mysql under OSX.
$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
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
var Credentials = Backbone.Model.extend({ | |
// ... code for a validated event here | |
}); | |
var LoginView = Backbone.View.extend({ | |
initialize: function(){ | |
this.loginButton = $("#login"); | |
// tight coupling and leaky code... | |
this.model.view = 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
# You can use this class in your console. For example | |
# p = ProfilingTools.new | |
# p.profiled_request(:controller => :welcome, :action => :index) | |
# this will profile whole application stack and save file in your tmp/profiler folder | |
# You can also use +request+ method just to see the output for example: | |
# | |
# p.request(:controller => :offers, :action => :index) | |
# | |
# p.response.body | |
# p.response.cookies # and so on |
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
# Make sure you do this from time to time: | |
sudo apt-get update && sudo apt-get upgrade -y | |
# Here are the actual packages (feel free to contribute): | |
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev nodejs libssl-dev libreadline6-dev libreadline-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev ncurses-term automake libtool bison subversion libcurl4-openssl-dev mysql-client mysql-server postgresql postgresql-contrib imagemagick libmagickwand-dev apache2-mpm-prefork apache2-prefork-dev libapr1-dev libaprutil1-dev redis-server vim -y | |
# Make default editor vim :) | |
echo "export EDITOR=vim" >> ~/.bashrc | |
# Install RVM |
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
module System | |
extend self | |
def cpu_count | |
return Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java | |
return File.read('/proc/cpuinfo').scan(/^processor\s*:/).size if File.exist? '/proc/cpuinfo' | |
require 'win32ole' | |
WIN32OLE.connect("winmgmts://").ExecQuery("select * from Win32_ComputerSystem").NumberOfProcessors | |
rescue LoadError | |
Integer `sysctl -n hw.ncpu 2>/dev/null` rescue 1 | |
end |
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
$ godaddy buy wynn.fm | |
-- Reading CC Info from .godaddy... | |
-- THANK YOU FOR PURCHASING YOUR DOMAIN WITH GODADDY! | |
-- WHILE OUR SERVERS THINK ABOUT REGISTERING YOUR DOMAIN | |
-- NAME, PLEASE GIVE CAREFUL CONSIDERATION TO THE | |
-- FOLLOWING SPECIAL OFFERS!!! | |
Would you like to also register the following and SAVE 64%? | |
wynn.net |
-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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 | |
# A script to set up a new mac. Uses bash, homebrew, etc. | |
# Focused for ruby/rails development. Includes many utilities and apps: | |
# - homebrew, rvm, node | |
# - quicklook plugins, terminal fonts | |
# - browsers: chrome, firefox | |
# - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
# - team: slack, dropbox, google drive, skype, etc |
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
require 'parallel' # gem install parallel (https://github.com/grosser/parallel) | |
# Monkey patch to Sprockets::StaticCompiler, a class provided by actionpack | |
# that's used by the assets:precompile task. This patch uses the Parallel gem | |
# to parallelize asset compilation in the simplest way possible. | |
# | |
# Parallel wraps Process.fork to handle things like inter-process communication | |
# via pipes and determining the maximum number of processes to run based on | |
# your system's total logical processors. So far only tested on MRI 1.9.3 on OS X. | |
module Sprockets |
OlderNewer