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 Foo | |
@blah = [:first_name, :last_name, :country, :city, :address, :phone, :email] | |
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
class Comment < ActiveRecord::Base | |
attr_accessible :text | |
belongs_to :user | |
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
angular.module('app.directives', []) | |
.directive 'ngMap', -> | |
scope: | |
markers: '&ngMarkers' | |
link: (scope, element, attrs, controller) -> | |
markers = scope.markers() | |
mapOptions = | |
center: if markers then markers[0] else new google.maps.LatLng(35.784, -78.670) | |
zoom: 15 | |
mapTypeId: google.maps.MapTypeId.ROADMAP |
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
"F\xBB\x1C\\i\xF9\xFA\xA7J,\xA0\x06\xF4\xA3\xED\xE9\x8EY\xEE}\x85\x7FI\x92\xBFBT\b\x8B\xA9\xE4\xE3\xB8\x9D]\xD4s\xA3\x9D\x82\x8A%~z\xAC\xB2\xD5J\xF3\xF8\xC0\xCF\x9C\x12[[\xD6H\xC7\xC9N+\xD5\xC9\x0E\x15\x81}D\xD1\xD5\f\x95\x9AM\x18\xE2&\xFE\xD7I\xE2\xF1\xB3d\x92\xB3H\xA8\xCD\x93|\xEA\xB7\x01\xAB\xE1\xB5\xB7\x80\x84\xFB\xF4\x0F\x14X\x81\x96\v;\x01\xBC#\xC6\xFB1\x9E`\x9Eu;r\x9C3\xE1Mk\xDExFx\xD5\xF0A\x9BL\x86\xA9\x0F\xFF\x83D\xC8d\xDE\x1EXzy\xDC\x02^\xB7\x06\xA0\x95\x14\x817b\b\x90I\x9E\xA5M\x9F;\xD2\x11\xB4\\K\v^'\xF3X\x83\xCA]\xFCl\xFDP\xB3\xA9T\xF2\t\xC4\xDC\xD2\x96Q\xA5\xE9\xB6\xD7*\x8FKe\x8E\xFDQMh'\xBA._\x1E\xE8\xEB\xA2\xACf\x00\xD0\xA8ORs \xF4\x15\x17Th|\xEBV\xF4$P\x84\xF5(6dL%\e\x13\xB96\xF7>\x86\xB7\xF6~\xEDm\x8C\x9CV@\x96M\x17D\xE418H\xCC\xBC\x9E\x8F\xC3\xCC\xACx\xEFC\x89t\x87Y\xC1\x14\xCD\x0F\xB4\x016Akk=V?\x04\xC91\xBCE\xB0" |
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
file = File.open("LplUGvkTfCQ.jpg.torrent", "rb").read.bdecode | |
hash = file["info"]["pieces"] |
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
angular.module('app.directives', []) | |
.directive 'uploader', -> | |
restrict: 'A', | |
link: (scope, elem, attr, ctrl) -> | |
attr.$observe 'url', (value) -> | |
return if !value | |
console.log value |
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
set@hive:/var/www/tracker$ bundle exec rake assets:precompile | |
/home/set/.rvm/rubies/ruby-1.9.3-p392/bin/ruby /home/set/.rvm/gems/ruby-1.9.3-p392@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets | |
rake aborted! | |
/var/www/tracker/app/assets/templates/snippets/comment.html.erb has already been required | |
(in /var/www/tracker/app/assets/javascripts/angularjs/routes.coffee.erb) | |
/home/set/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.2.2/lib/sprockets/base.rb:267:in `circular_call_protection' | |
/home/set/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset' | |
/home/set/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset' | |
/home/set/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset' | |
/home/set/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset' |
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
<div class="comment_body" ng-class="{reply_to:rec.id == comment.id}"> | |
<div class="info"> | |
<span class="username">{{ comment.user.username }}</span> | |
<span class="date">{{ comment.created_at | date:"d MMMM yyyy in mm:HH"}}</span> | |
<ul class="inline actions"> | |
<li><a ng-show="session.is_admin" ng-href="" ng-click="remove_comment(comment)">Удалить</a></li> | |
<!-- <li><a ng-show="session.is_admin" ng-href="">Редактировать</a></li> --> | |
<li><a ng-show="session" ng-href="" ng-click="reply_to(comment)">Ответить</a></li> | |
<li ng-show="comment.responses"> |
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
<form action="<?php echo url_for('@events_edit?id='.$form->getObject()->getId()); ?>" method="POST"> | |
<ol> | |
<?php | |
foreach(json_decode($form['data']->getValue()) as $question){?> | |
<li> | |
<?php echo $question->text; ?> | |
<?php if ($question->type == 'text') {?> | |
<input type="text" /> | |
<?php }else foreach($question->options as $option){ ?> | |
<input type="checkbox" /> |
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
<form action="<?php echo url_for('@events_edit?id='.$form->getObject()->getId()); ?>" method="POST"> | |
<ol> | |
<?php foreach($form->getWidgetSchema()->getFields() as $index=>$field){?> | |
<?php if (get_class($field) !== 'sfWidgetFormInputHidden'){?> | |
<li> | |
<label for="<?php echo $index ?>"><?php echo $field->getLabel();?></label> | |
<?php echo $field->render($index);?> | |
</li> | |
<?php }}?> | |
</ol> |