This file contains hidden or 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
macbook:~ matt$ brew install mysql \ | |
> && sudo mkdir -p /Library/LaunchAgents \ | |
> && sudo cp LaunchAgents/homebrew.mxcl.mysql.plist /Library/LaunchAgents/ \ | |
> && sudo launchctl load /Library/LaunchAgents/homebrew.mxcl.mysql.plist \ | |
> && sudo mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
==> Installing mysql dependency: cmake | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.10.1.mountainlion.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring cmake-2.8.10.1.mountainlion.bottle.tar.gz | |
/usr/local/Cellar/cmake/2.8.10.1: 683 files, 32M |
This file contains hidden or 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
macbook:osx-stack matt$ brew install /usr/local/LibraryAlt/duplicates/php.rb --with-fpm --with-mysql | |
==> Downloading http://www.php.net/get/php-5.3.10.tar.bz2/from/this/mirror | |
Already downloaded: /Library/Caches/Homebrew/php-5.3.10 | |
==> Patching | |
patching file ext/tidy/tidy.c | |
patching file ext/mssql/php_mssql.h | |
Hunk #1 succeeded at 70 (offset 5 lines). | |
==> ./configure --prefix=/usr/local/Cellar/php/5.3.10 --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/ | |
Warning: inreplace in 'Makefile' failed | |
Expected replacement of 'INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/usr/libexec/apache2' && $(mkinstalldirs) '$(INSTALL_ROOT)/private/etc/apache2' && /usr/sbin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/libexec/apache2' -S SYSCONFDIR='$(INSTALL_ROOT)/private/etc/apache2' -i -a -n php5 libs/libphp5.so' with 'INSTALL_IT = $(mkinstalldirs) '/usr/local/Cellar/php/5.3.10/libexec/apache2' && $(mkinstalldirs) '$(INSTALL_ROOT)/private/etc/apache2' && /usr/sbin/apxs -S LIBEXECDIR='/usr/local/Cellar/php/5.3.10/l |
This file contains hidden or 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
Exception | |
NoMethodError | |
Error | |
undefined method `id' for nil:NilClass | |
/home/gitlab/gitlab/app/models/project.rb:104:in `find_with_namespace' | |
/home/gitlab/gitlab/app/workers/post_receive.rb:9:in `perform' | |
This file contains hidden or 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 PermittedParams < Struct.new(:params, :user) | |
def topic | |
params.require(:topic).permit(*topic_attributes) | |
end | |
def topic_attributes | |
[:name].tap do |attributes| | |
attributes << :sticky if user && user.admin? | |
attributes << {posts_attributes: {:"0" => post_attributes}} | |
end |
This file contains hidden or 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 Feature < ActiveRecord::Base | |
has_many :product_features | |
has_many :products, :through => :product_features | |
attr_accessible :name | |
end |
This file contains hidden or 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 Product < ActiveRecord::Base | |
belongs_to :company | |
has_many :features, | |
:class_name => 'ProductFeature', | |
:source => :product_feature, | |
:include => :feature | |
attr_accessible :description, | |
:name, |
This file contains hidden or 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 a = []; | |
function addPart(part) { | |
someFunction('blah', function(var) { | |
alert(a.length); // correct value: 0, 1, 2 | |
a.push(part); | |
}); | |
} | |
function init() | |
{ |
This file contains hidden or 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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
tar -xvzf ruby-1.9.3-p392.tar.gz | |
cd ruby-1.9.3-p392/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains hidden or 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
<?php | |
protected function _checkUrl($url, $secure = false) | |
{ | |
$prefix = $secure ? 'install/wizard/checkSecureHost/' : 'install/wizard/checkHost/'; | |
try { | |
$client = new Varien_Http_Client($url . 'index.php/' . $prefix); | |
$response = $client->request('GET'); | |
/* @var $responce Zend_Http_Response */ | |
$body = $response->getBody(); |
This file contains hidden or 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
# Backup and Swap Files | |
.*.sw? | |
*.bak | |
*~ | |
# Komodo | |
*.komodoproject | |
.komodotools | |
# PHPStorm |
OlderNewer