Skip to content

Instantly share code, notes, and snippets.

$.getScript('https://js.stripe.com/v3/', function() {
var stripe = Stripe(STRIPE_TEST_KEY);
var paymentRequest = stripe.paymentRequest({
country: 'US',
currency: 'usd',
total: {
label: 'Demo total',
amount: 1099,
},
FROM node:8.11.1
RUN git clone https://github.com/Szpadel/chrome-headless-render-pdf.git /test
WORKDIR /test
RUN apt-get update && apt-get install -y fonts-liberation libappindicator1 libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdbus-1-3 libgtk-3-0 libnspr4 libnss3 libx11-xcb1 libxss1 lsb-release xdg-utils
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb
diff --git a/index.js b/index.js
index 6b53ab4..b6dce0b 100644
--- a/index.js
+++ b/index.js
@@ -87,15 +87,16 @@ class RenderPDF {
await LayerTree.enable();
await Page.navigate({url});
- await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: 5000});
#!/usr/bin/env ruby
require 'json'
seed_url = "https://sfbay.craigslist.org/jsonsearch/apa/sfc/?is_paid=all&search_distance_type=mi&max_price=4000&bedrooms=1&bathrooms=1%27"
listings = JSON.parse(`curl "#{seed_url}"`)[0]
results = []
listings.each do |listing|
if listing['GeoCluster']
class CoursePrerequisite < ActiveRecord::Base
belongs_to :course
belongs_to :prerequisite, :class_name => 'Course'
attr_accessible :required
belongs_to :suggested_by, :class_name => 'User'
end
class Course
has_many :course_prerequisites