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
lsiden@morpheus [angular-test-patterns] (master=) [1]$ npm test | |
> [email protected] test /home/lsiden/projects/scratch/angular-test-patterns | |
> npm run testRules && npm run testPatterns && npm run testExamples | |
> [email protected] testRules /home/lsiden/projects/scratch/angular-test-patterns | |
> node spec/rule.tester.js | |
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
ERROR TypeError: no implicit conversion of nil into String | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/handler/webrick.rb:73:in `block in service' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' | |
/home/lsiden/.rvm/gems/ruby-2.1.0@myapp/gems/rack-1.5.2/lib/rack/handler/webrick.rb:72:in `service' |
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
# Prevent self.user from being changed | |
alias_method :old_user_assign, :user= | |
def user=(new_user) | |
if self.new_record? | |
old_user_assign new_user | |
else | |
logger.warn "Attempt to modify user of record, id=#{self.id} with user id=#{new_user.id}" | |
return false | |
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
test "inverse of user.profiles" do | |
user = create :user | |
profile = create :profile, user: user | |
assert_equal profile, user.profiles.first, "profile == user.profiles.first" | |
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
a:1:{i:0;a:7:{s:5:"title";s:10:"nf-iconbox";s:4:"vars";s:13:"title,imgpath";s:9:"shortcode";b:1;s:3:"php";b:0;s:11:"wptexturize";b:0;s:7:"snippet";s:196:"<div class="iconbox"> | |
<span class="nf-iconbox" style="background-image: url('{imgpath}'); background-repaeat: no-repeat; vertical-align: middle !important; "></span><br> | |
<h3>{title}</h3> | |
</div>";s:11:"description";s:75:"Insert a custom NewFoundry iconbox. Same functionality as Inovado iconbox.";}} |
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 | |
App::uses('AnnouncementsController', 'Controller'); | |
class MockAnnouncementsController extends AnnouncementsController { | |
var $name = 'Announcements'; | |
var $autoRender = false; | |
/* | |
function redirect($url, $status = null, $exit = true) { | |
$this->redirectUrl = $url; |
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
-- MySQL dump 10.11 | |
-- | |
-- Host: localhost Database: demo | |
-- ------------------------------------------------------ | |
-- Server version 5.0.96 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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
# mount | |
rootfs on / type rootfs (ro,relatime) | |
tmpfs on /dev type tmpfs (rw,relatime,mode=755) | |
devpts on /dev/pts type devpts (rw,relatime,mode=600) | |
proc on /proc type proc (rw,relatime) | |
sysfs on /sys type sysfs (rw,relatime) | |
none on /acct type cgroup (rw,relatime,cpuacct) | |
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000) | |
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000) | |
none on /dev/cpuctl type cgroup (rw,relatime,cpu) |
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
#!/bin/bash | |
# Use this script instead of ~/.rvm/bin/rvm-prompt | |
# and the output of rvm-prompt will show up in your command prompt | |
# only if you are in a Ruby project directory. | |
# see http://stackoverflow.com/a/4264351/270511 | |
# and http://unix.stackexchange.com/questions/13464/is-there-a-way-to-find-a-file-in-an-inverse-recursive-search |
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
# modified from https://gist.github.com/763374 | |
module DataMapper | |
module Resource | |
def taint! property | |
self.persistence_state = PersistenceState::Dirty.new(self) \ | |
unless self.persistence_state.kind_of?(PersistenceState::Dirty) | |
self.persistence_state.original_attributes[properties[property]] = Object.new | |
end | |
end | |
end |