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
# For tmux > 2.4a | |
setw -g mode-keys vi | |
bind P paste-buffer | |
bind-key -T copy-mode-vi v send-keys -X being-selection | |
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel |
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
syntax on | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set bg=dark | |
set nu | |
set ruler | |
set hlsearch | |
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:30' | |
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] |
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
<!-- has_alerts is true and view_opts.state is set to 'expired' --> | |
<div id='BriefAlert' class='alert alert-info' ng-if='has_alerts'> | |
<span ng-switch='view_opts.state'> | |
<span ng-switch-when='expired'>Brief closed -- Not completed before expiration date</span> | |
<span ng-switch-when='reassigend'>Brief closed -- Reassignment of {{reassignmentPhrase()}}</span> | |
<span ng-switch-when='view_only'>You only have permissions to view the questions of this brief</span> | |
</span> | |
</div> |
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
<!-- has_alerts is true and view_opts.state is set to 'expired' --> | |
<div id='BriefAlert' class='alert alert-info' ng-show='has_alerts'> | |
<span ng-switch='view_opts.state'> | |
<span ng-switch-when='expired'>This thing was expired</span> | |
<span ng-switch-when='reassigend'>This thing was reassigned to someone else</span> | |
<span ng-switch-when='view_only'>You can only view this thing</span> | |
</span> | |
</div> |
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
module ViJedi::SentenceUtil | |
SIMILARITY_PERCENTAGE = 0.4 | |
# boolean check to see if the source and prime sentences are the same | |
def self.similar(source, prime) | |
return compute_values(source, prime)[:mismatch_percentage] < SIMILARITY_PERCENTAGE | |
end | |
# returns the word difference between the source and prime | |
def self.word_distance(source, prime) |
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 Api::BaseController < ApplicationController | |
include Rivalry::OrganizationScope | |
respond_to :json | |
private | |
def self.paginated_action(options = {}) | |
before_filter(options) do |controller| | |
if request.headers['Range-Unit'] == 'items' && | |
request.headers['Range'].present? |
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
rails g migration migrationname --orm=active_record |
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
<!-- The following lines force less into development mode --> | |
<script type="text/javascript"> | |
var less = { env: 'development'}; | |
</script> | |
<link rel="stylesheet/less" type="text/css" href="/less/bootstrap.less" > | |
<link rel="stylesheet/less" type="text/css" href="/less/responsive.less" > | |
<%= javascript_include_tag 'less-1.2.2.min' %> | |
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
order = case(params[:order]) | |
when 'user_email_desc' | |
'email DESC' | |
when 'user_email_asc' | |
'email ASC' | |
else | |
nil | |
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
column('Email', :sortable => :user_email) {|user| user.email} |
NewerOlder