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
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
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
# http://swtch.com/~rsc/regexp/regexp1.html | |
$_ = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | |
if ( m/a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ ) { | |
print "hello"; | |
} |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
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
require 'file_size_validator' | |
require 'my_file_util' | |
class Student < ActiveRecord::Base | |
attr_accessible :marital_status, :community, :date_of_birth, :email, :first_name, :gender, :photo, :photo_cache, :fee_receipt_no, :program_ids, :fee_amount, | |
:last_attended_school_name, :surname, :lga, :middle_name, :mobile, :nationality, :phone, :registration_id, :status, :registration_number, | |
:registration_pin, :program_id, :attachments_attributes, :score, :admission_remark, :offered_program_id, :jamb_score, :jamb_registration_number, :batch_id, :admission_no, | |
:admission_date, :blood_group, :birth_place, :language, :religion, :address_attributes, :next_of_kin_attributes, :course_ids, :carry_over_course_ids, :academic_session, | |
:student_category_id, :country_id, :state_id, :lga_id, :answers_attributes, :user_id, :second_next_of_kin_attributes, :previous_attended_school_attributes |
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 InstitutionsController < ApplicationController | |
load_and_authorize_resource :only => [:destroy,:edit,:new,:create,:update] | |
before_filter :authenticate_user!, :except => [:student_registration, :show, :validate_registration_pin, :result, :admission, :buy_registration_pin,:paygate_callback_failure, :paygate_cancel, :paygate_pending, :paygate_callback_success, :pin_transaction_info_print] | |
before_filter :find_institution, :except => [:show,:index, :new, :create, :semesters_for_institute_type, :start_end_date_for_assessment_period, :courses_for_batch, :paygate_callback_failure, :paygate_cancel, :paygate_pending, :paygate_callback_success, :pin_transaction_info_print] | |
before_filter :add_bread_crumb,:except => [:show] | |
# layout 'print', :only => [:pin_transaction_info_print] | |
# add_breadcrumb "Dashboard", :root_path | |
# layout "schoolit", :only => [:dashboard] | |
#layout 'print', :only => [:pin_transaction_info_print] | |
def add_bread_crumb |
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
def self.search(employee_params, query_options_params, checked_fields) | |
sql = '' | |
date_of_employement_from = '' | |
date_of_employement_to = '' | |
date_of_birth_from = '' | |
date_of_birth_to = '' | |
employee_params.each do |key, value| | |
if (key.start_with?('employee_') && is_checked(key, checked_fields)) | |
column = key.gsub('employee_','') |
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
ssh -C app@IP_ADDRESS 'cat /var/www/apps/WEBSITE/backups/dump.sql.bz2' | bunzip2 -dc | rails db |
NewerOlder