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 'csv' | |
def transform_merge(csv_file) | |
CSV.open(@csv_file).read.each do |line| | |
end | |
end | |
def multiple_merge(inputs) | |
errors = [] |
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
Object.defineProperties(Circle.prototype, { | |
radius: { | |
get: function(){ | |
}, | |
set: function(r){ | |
} | |
}, |
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
# dirty little alias to restart nginx and passenger | |
function kicknginx () { | |
kill -HUP `cat /usr/local/var/run/nginx.pid` | |
touch ./tmp/restart.txt | |
} |
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 Services::V1::UserEmploymentsController < ApplicationController | |
include Security::Services | |
include Services::ResourceValidations | |
def show | |
employment = find_employment(params) | |
render json: EmploymentSerializer.member(employment), status: :ok | |
end | |
private |
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
certification = Factory(:certification) | |
owner = Factory(:user_with_account) | |
owner.add_to_certification certification |
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 merge(user1, user2, preferred_email) | |
user1.strip! | |
user2.strip! | |
raise "Email cannot be the same" if (user1 == user2) | |
u = User.unscoped.find_by_email(user1) | |
u2 = User.unscoped.find_by_email(user2) | |
raise "User1 not found" if u.nil? |
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
SELECT `essential_exceptions`.reason, `courses`.name FROM `essential_exceptions` | |
LEFT JOIN `essentials` on `essentials`.id = `essential_exceptions`.essential_id | |
LEFT JOIN `courses` on `courses`.id = `essentials`.course_id | |
WHERE `essential_exceptions`.`user_id` = 29966 | |
ORDER BY courses.name; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.apache.solr</string> | |
<key>OnDemand</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> |
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
location ~ ^/assets/ { | |
expires 1y; | |
add_header Cache-Control public; | |
# Some browsers still send conditional-GET requests if there's a | |
# Last-Modified header or an ETag header even if they haven't | |
# reached the expiry date sent in the Expires header. | |
add_header Last-Modified ""; | |
add_header ETag ""; | |
break; |
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
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass-rails', "~> 3.1.0" | |
gem 'coffee-rails', "~> 3.1.0" | |
gem 'uglifier' | |
end |