blah | ||
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
# Sensible defaults for development | |
CONFIGURATION_SETUP=config.DevelopmentConfig | |
HOST_SERVER=test | |
HOST_SERVER_URL="https://placeholder_for_test.com" | |
SECRET_KEY="1234" |
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
from flask_wtf import FlaskForm | |
from wtforms import TextAreaField, SubmitField, RadioField | |
from wtforms.validators import DataRequired | |
class HtmlForm(FlaskForm): | |
html = TextAreaField( | |
"Paste exported html", validators=[DataRequired()] | |
) | |
hosts = [("s1", "S1"), ("b2", "B2")] |
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
eval "$(pyenv init -)" | |
export WORKON_HOME=~/.virtualenvs | |
. ~/.pyenv/versions/3.7.4/bin/virtualenvwrapper.sh | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | |
export PATH="$PATH:$HOME/.rvm/bin" |
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 EnhancedObject < ActiveRecord::Base | |
def self.from_museum_object(parsed_museum_object, object_namer, object_locator) | |
logger.debug "Museum_Object_Data: #{parsed_museum_object}" | |
EnhancedObject.new.tap do |enhanced_object| | |
enhanced_object.attributes = { | |
museum_unique_id: parsed_museum_object.museum_unique_id, | |
museum_number: parsed_museum_object.museum_number, | |
object_type: parsed_museum_object.object_type, | |
object_data_id: parsed_museum_object.museum_object_id, |
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
<p>Generate Outstanding Migration CSV Report: <%= link_to("CSV Report", admin_dashboard_collection_objects_path(format: :csv), class: "btn btn-success",) %></p> |
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 Grains | |
LOCATIONS = (1..64) | |
MULTIPLIER = 2 | |
def self.square(location) | |
new(location).square | |
end | |
def self.total | |
new(LOCATIONS.min).total |
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 Grains | |
def self.square(square_no) | |
raise ArgumentError, 'Square must be between 1 and 64' unless square_no >= 1 && square_no <= 64 | |
chessboard[square_no - 1] | |
end | |
def self.chessboard | |
chessboard = [] | |
(1..64).each do |square| |
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
import UIKit | |
import AVFoundation | |
class ViewController: UIViewController, AVAudioPlayerDelegate { | |
var audioPlayer : AVAudioPlayer! | |
let soundArray = ["note1", "note2", "note3", "note4", "note5", "note6", "note7"] | |
override func viewDidLoad() { |
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 loops through a list of products, updating a cell that triggers a query refresh on main | |
// Then each product query is exported to pdf | |
function exportLoopedSheet(firstRow, lastRow) { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheetName = 'Printout'; // update for print sheet name | |
var productSheetName = 'Product_List'; // update for final product list | |
var folderName = 'productPDFs'; | |
var main = ss.getSheetByName(sheetName); | |
var sheets = ss.getSheets(); |
NewerOlder