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
<script> | |
function view_books() | |
{ | |
$.getJSON('https://www.googleapis.com/books/v1/volumes?q=food+allergies&maxResults=5', function(data) { | |
var items = []; | |
$.each(data, function(key, val) { | |
items.push('<li id="' + key + '">' + val + '</li>'); | |
}); |
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
[].each do |table| | |
time = Time.now.strftime("%Y%m%d%H%M%S") | |
filename = "#{time}_add_lock_version_to_#{table}.rb" | |
File.open(filename, 'w') do |file| | |
file.puts("class AddLockVersionTo#{table.camelize} < ActiveRecord::Migration[5.2]") | |
file.puts(" def change") | |
file.puts(" add_column :#{table}, :lock_version, :integer, default: 0") | |
file.puts(" end") | |
file.puts("end") | |
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
let digitHour0, digitHour1, digitMinute0, digitMinute1, digitSecond0, digitSecond1; | |
let colon1, colon2; | |
function setup() { | |
createCanvas(395, 110); | |
} | |
function draw() { | |
background(51); | |
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
server { | |
server_name calc-mate.com www.calc-mate.com; | |
root /path/to/calc-mate/build; | |
index index.html; | |
location / { | |
try_files $uri /index.html; | |
} | |
} |