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 tabline=%!MyTabLine() " custom tab pages line | |
function MyTabLine() | |
let s = '' " complete tabline goes here | |
" loop through each tab page | |
for t in range(tabpagenr('$')) | |
" set highlight | |
if t + 1 == tabpagenr() | |
let s .= '%#TabLineSel#' | |
else | |
let s .= '%#TabLine#' |
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
javascript:(function() { document.getElementById('new_comment_field').value="``` | |
. | |
.'| .8 | |
. | .8: | |
. | .8;: .8 | |
. | .8;;: | .8; | |
. n .8;;;: | .8;;; | |
. M.8;;;;;: |,8;;;;; | |
. .,'n8;;;;;;: |8;;;;;; | |
. .', n;;;;;;;: M;;;;;;;; |
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
[ | |
[0] { | |
:text => "Less than 54,000", | |
:data_point_uid => "companymo1", | |
:uid => "lessthan51" | |
}, | |
[1] { | |
:text => "54,001 - 268,000", | |
:data_point_uid => "companymo1", | |
:uid => "5400126801" |
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
Sidekiq.redis {|c| c.del('stat:processed') } | |
and to reset failed jobs: | |
Sidekiq.redis {|c| c.del('stat:failed') } | |
bundle exec sidekiq -q high,5 default | |
RAILS_ENV=production bundle exec sidekiq -d -L /home/deployer/apps/collector/shared/sidekiq.log -q high,5 default |
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
{ | |
"raw_data":{ | |
"member_reference_number":48192, | |
"user_id":"BB03000104", | |
"first_name":"Jacqueline", | |
"last_name":"del Rosario", | |
"civil_status":"S", | |
"date_of_birth":"1981-09-14T00:00:00.000+07:30", | |
"gender":"1", | |
"ac_holder_type":"HI", |
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 UpdateAddressOfASchool < ActiveRecord::Migration | |
def up | |
['Ateneo', 'UP'].each do |name| | |
school = School.where(name: name).first | |
if school | |
school.update_attributes(address: "Quezon City") | |
end | |
end | |
end | |
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
module HealthCheck | |
class SlackNotification | |
attr_accessor :health_check | |
def initialize(health_check) | |
@health_check = health_check | |
end | |
def send | |
if beyond_threshold? && activated? && !Rails.env.development? |
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
# sending to mcroldan08@gmail.com | |
5416 Jan 24 00:00:27 li387-184 postfix/smtp[25370]: 2AE56FAED: to=<mcroldan08@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:4008:c01::1b]:25, delay=3.4, delays=0.04/0.05/0.86/2.4, ds n=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:4008:c01::1b] said: 550-5.7.1 [2400:8900::f03c:91ff:fe70:bb41 12] Our system has detected that 550-5.7.1 this mess age is likely unsolicited mail. To reduce the amount of spam 550-5.7.1 sent to Gmail, this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?h l=en&answer=188131 for 550 5.7.1 more information. s8si608207bkr.298 - gsmtp (in reply to end of DATA command)) | |
# vim /var/log/mail.log |
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
# Development | |
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /home/neilmarion/ROR/projects/feddit && rvm 2.0.0@feddit && RAILS_ENV=development bundle exec rake trend:newsletter --silent' | |
# Production | |
# Begin Whenever generated tasks for: /home/deployer/apps/feddit/releases/20131230142259/config/schedule.rb | |
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /home/deployer/apps/feddit/current && RAILS_ENV=production ~/.rbenv/shims/bundle exec rake trend:hot --silent' |
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
config.before(:each) do | |
Mongoid::Sessions.default.collections.select {|c| c.name !~ /system/ }.each(&:drop) | |
end |
NewerOlder