Skip to content

Instantly share code, notes, and snippets.

View stephaniewilkinson's full-sized avatar
🐧

Stephanie stephaniewilkinson

🐧
View GitHub Profile
school.school_surveys.each do |survey|
survey.standards.each do |standard|
standard.questions.each do |question|
question.answers.each do
if question.rating?
question.answers.each do |answer|
if answer.school_survey_id = survey.id
answer_array.push answer
else
answer_array.push "Not Applicable"

To create:

git tag c1b3c4601b72a64741bfea3b2fe9a4166ddf6600 -a v1.1 -m "Upgraded to Rails 5.0"
git push --tags

To delete:

git tag -d v1.1
git push origin :refs/tags/v1.1
HTTP.basic_auth(auth).persistent(BOOKMOOCH_URI) do |http|
if isbns_and_image_urls
def post_to_bookmooch(isbn, image_url,title)
...
end
pool = ConnectionPool.new(size: 5, timeout: 5) do
HTTP.persistent("https://bookmooch.com/....")
end
[ +140 ms] [/Users/steph/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +140 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/alpha
[ ] [/Users/steph/flutter/] git ls-remote --get-url origin
[ +10 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] [/Users/steph/flutter/] git log -n 1 --pretty=format:%H
[ +11 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ +2 ms] 701d534ba93eaa3452f5e6b8b73ad8bd5a48847b
[ +2 ms] [/Users/steph/flutter/] git log -n 1 --pretty=format:%ar
@stephaniewilkinson
stephaniewilkinson / mssql.md
Created April 24, 2018 23:36
Connecting to Microsoft SQL Server 2008 with Ecto and Phoenix

There are two Ecto Adapters for MSSQL feautured on the Ecto Github.

Unicorn Config

/root/api/config/unicorn.rb

My Nginx Config

/etc/nginx/default.d/default.conf

Default nginx config

AllCops:
TargetRubyVersion: 2.5.1
EnabledByDefault: true
#################### Bundler ##############################
Bundler/DuplicatedGem:
Enabled: true
Bundler/OrderedGems:
{
"attributes": {
"type": "Account",
"url": "/services/data/v42.0/sobjects/Account/0010n00000wT51BAAS"
},
"Id": "0010n00000wT51BAAS",
"IsDeleted": false,
"MasterRecordId": null,
"Name": "The Sample School",
"Type": "Member",
{
"attributes": {
"type": "Contact",
"url": "/services/data/v42.0/sobjects/Contact/0030n00000fjWPnAAM"
},
"Id": "0030n00000fjWPnAAM",
"IsDeleted": false,
"MasterRecordId": null,
"AccountId": "0010n00000zKmXaAAK",
"LastName": "TesterGuid",
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfUserInfo xmlns="http://sso.nais.org/SsoDataWebService">
<UserInfo>
<UserNumber>string</UserNumber>
<Username>string</Username>
<FirstName>string</FirstName>
<LastName>string</LastName>
<EmailAddress>string</EmailAddress>
<Title>string</Title>
<AddressLine1>string</AddressLine1>