Skip to content

Instantly share code, notes, and snippets.

Check out the YouTube link for additional help:

  1. Go to
  2. Fill out all your personal details
  3. Copy this script above
  4. In your browser, open up Developer Tools
  5. Paste this script into the console
  6. Sit back and wait for an appointment you like to appear. This usually takes about ten minutes.

If the page stops refreshing (because it found an appointment), but you don't like the time or location, just type:

gjtorikian / pro-up.rb
Last active January 7, 2021 17:01
Is there new info on MacRumors yet
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
model = 'MacBook_Pro_16'
url = "\##{model}"
doc = Nokogiri::HTML(
gjtorikian / main.go
Created October 13, 2020 15:43
Heroku chat sample
package main
import (
gjtorikian / querying_for_files.graphql
Last active February 22, 2019 14:24
sample GQL query for fetching files via GitHub GQL API
# get a list of files off the tree entries
repository(owner: "gjtorikian", name: "html-proofer") {
ref(qualifiedName: "refs/heads/master") {
target {
... on Commit {
tree {
entries {
object {
gjtorikian / extract.rb
Last active May 27, 2018 17:43
Geocities extraction script
require 'pty'
def run_cmd(cmd)
PTY.spawn( cmd ) do |stdout, stdin, pid|
# Do stuff with the output here. Just printing to show it works
stdout.each { |line| print line }
rescue Errno::EIO
puts "Errno:EIO error, but this probably just means " +
repository(owner: "facebook", name: "mention-bot") {
object(expression: "master") {
... on Commit {
blame(path: "cookieJar.js") {
ranges {
commit {
gjtorikian / routes.rake
Created March 15, 2016 02:44
Rake task to show Sinatra routes within a Rails app
namespace :api do
# Sample output is a header (listing the class name) followed by
# the verb + endpoint. For example:
# ### Within Api::Git
# GET /repositories/:repository_id/git
desc "List all the API endpoints with their verbs."
task :routes => :environment do
gjtorikian / sinatra.diff
Created January 14, 2016 20:22
diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb
index 3b07ab0..b76ef47 100644
--- a/lib/sinatra/base.rb
+++ b/lib/sinatra/base.rb
@@ -2,6 +2,7 @@
require 'rack'
require 'tilt'
require 'rack/protection'
+require 'forwardable'
gjtorikian / convert_to_backticks.rb
Created November 20, 2015 06:49
indent to backticks
Dir.glob('content/**/*.md') do |file|
content =
content = content.gsub(/{:.terminal}\n[\s\S]*?^$/) do |match|
lines = match.lines
lines = lines[1..-1].map do |line|
lines.unshift("``` command-line\n")
lines << "```\n"
gjtorikian / random.rb
Created October 6, 2015 00:24
Script to generate random files
LORUM = %w(lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat volup