This file contains hidden or 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 add_keywords_to_profile(user) | |
| io = open(user.resume_pdf.to_s) | |
| reader = PDF::Reader.new(io) | |
| reader.pages.each do |page| | |
| string = page.text | |
| KeywordHelper.keywords.each do |word| | |
| if string.downcase.include?(word.downcase) | |
| user.keywords.push(word) | |
| user.save | |
| end |
This file contains hidden or 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 STUDENTS.name, case when PAYMENTS.amount > 0 then 'true' else 'false' end AS have_paid, | |
| FROM students WHERE MONTH(PAYMENTS.created_at) = 2 |
This file contains hidden or 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
| function subscribeToList(email) { | |
| var params = { | |
| AccountId: "xxxxxxxxxxx", // your AWS user account ID | |
| RoleArn: "arn:aws:iam::xxxxxxxxxxx:role/Cognito_mailchimpCognitoUnauth_Role", // your Cognito unauth role (it wil look something like this) | |
| IdentityPoolId: "us-east-1:xxxxxxxxxxxxxxxxx" // the identity pool id found in Cognito | |
| }; | |
| // set the Amazon Cognito region | |
| AWS.config.region = 'us-east-1'; | |
| // initialize the Credentials object with our parameters |
This file contains hidden or 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
| /** | |
| * Copyright 2014 Amazon.com, | |
| * Inc. or its affiliates. All Rights Reserved. | |
| * | |
| * Licensed under the Amazon Software License (the "License"). | |
| * You may not use this file except in compliance with the | |
| * License. A copy of the License is located at | |
| * | |
| * http://aws.amazon.com/asl/ | |
| * |
This file contains hidden or 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
| API_KEY='xxxxxxxxxxxxxxxxxxx-us1' | |
| LIST_ID=12033101ax |
This file contains hidden or 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
| <div class="audio-player"> | |
| <div id="play-btn"></div> | |
| <div class="audio-wrapper" id="player-container" href="javascript:;"> | |
| <audio id="player" ontimeupdate="initProgressBar()"> | |
| <source src="https://dl-web.dropbox.com/get/Oslo.mp3?_subject_uid=199049471&w=AABuDNt9BDJnaZOelVFws9FXTufkXCvAPS5SYpy_gRZ2GQ&duc_id=dropbox_duc_id" type="audio/mp3"> | |
| </audio> | |
| </div> | |
| <div class="player-controls scrubber"> | |
| <p>Oslo <small>by</small> Holy Esque</p> | |
| <span id="seek-obj-container"> |
This file contains hidden or 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
| https://codeship.com/api/v1/builds/#GRAB_BUILD_NUMBER_AND_PLACE_HERE/restart.json?api_key=YOUR_CODESHIP_API_KEY |
This file contains hidden or 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 rotx(x, string, encrypt=true) | |
| alphabet = Array("A".."Z") + Array("a".."z") | |
| results = [] | |
| if encrypt == true | |
| key_encrypt_true = Hash[alphabet.zip(alphabet.rotate(x))] | |
| string.chars.each do |i| | |
| if ('a'..'z').include? i | |
| results << key_encrypt_true.fetch(i).downcase | |
| elsif ('A'..'Z').include? i |