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
// POST to - https://ogramwebapi.azurewebsites.net/api/v1/CreateWE | |
// payload | |
{ | |
"WorkExperienceDetails":{ | |
"new_yearsofexperience":4, | |
"new_hourlyrate":20, | |
"new_shiftrate":20, | |
"new_weeklyrate":20, |
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
@extends('layouts.scaffold') | |
@section('main') | |
<div class="row-fluid"> | |
<div class="span12"> | |
<h1>Create Article</h1> | |
</div> | |
</div> | |
<div class="row-fluid"> |
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 Contact < ActiveRecord::Base | |
acts_as_citier | |
has_many :contacts_service_types | |
has_many :service_types, :through=>:contacts_service_types | |
end | |
class ContactsServiceType < ActiveRecord::Base |
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
hyderab1@hyderabadwaley.com [~/www/openerp]# python setup.py install | |
running install | |
error: can't create or remove files in install directory | |
The following error occurred while trying to add or remove files in the | |
installation directory: | |
[Errno 30] Read-only file system: '/usr/lib/python2.6/site-packages/test-easy-install-16014.write-test' | |
The installation directory you specified (via --install-dir, --prefix, or |
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
ali@Ali-PC:~/projects/fltctr$ cap deploy | |
* 2013-02-21 12:37:49 executing `deploy' | |
* 2013-02-21 12:37:49 executing `deploy:update' | |
** transaction: start | |
* 2013-02-21 12:37:49 executing `deploy:update_code' | |
updating the cached checkout on all servers | |
executing locally: "git ls-remote git@bitbucket.org:aliakmal/fltctr.git HEAD" | |
command finished in 4722ms | |
* executing "if [ -d /var/www/html/fltctr.com/shared/cached-copy ]; then cd /var/www/html/fltctr.com/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 2833daae8c6b627b03941ebacb3ae2b837fc47b5 && git clean -q -d -x -f; else git clone -q git@bitbucket.org:aliakmal/fltctr.git /var/www/html/fltctr.com/shared/cached-copy && cd /var/www/html/fltctr.com/shared/cached-copy && git checkout -q -b deploy 2833daae8c6b627b03941ebacb3ae2b837fc47b5; fi" | |
servers: ["166.78.22.204"] |
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 "bundler/capistrano" | |
set :application, "fltctr" | |
set :repository, "git@bitbucket.org:aliakmal/fltctr.git" | |
set :scm, :git | |
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
# Define your server here | |
server "166.78.22.204", :web, :app, :db, primary: true |
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
Installing therubyracer (0.11.3) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/usr/bin/ruby1.9.1 extconf.rb | |
checking for main() in -lpthread... yes | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. |
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.has_none?(user) | |
accessible_records_by(user).empty? | |
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
<?php | |
class App_Controller_Action extends Zend_Controller_Action { | |
protected $type; | |
function getDatesBetween2Dates($startTime, $endTime) { | |
$day = 86400; | |
$format = 'Y-m-d'; | |
$startTime = strtotime($startTime); |
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
if user.has_role? :station_manager,:any | |
can :read, Station do |station| | |
Station.owned_by_station_manager(user).where(id: station.id).any? | |
end | |
can [:read,:confirm,:invoice], Flight do |flight| | |
Flight.owned_by_station_manager(user).where(id: flight.id).any? | |
end | |
can :read, Product do |product| | |
Product.owned_by_station_manager(user).where(id: product.id).any? | |
end |
NewerOlder