Skip to content

Instantly share code, notes, and snippets.


Here we find world population by timezone (from an extremely reliable source: an online quiz).

First, we can try using rvest to grab the results. But there's a problem, we need to actually play the quiz in order for the UTC offsets to appear on page.


stevecondylios /
Last active Mar 23, 2021
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github (i.e. Github Flavored Markdown) in 2020!


<img src="" width=50% height=50%>


<img src="" width="150" height="280">

View init.R
# init.R
# Example R code to install packages if not already installed
my_packages = c("tidyverse", "shiny")
install_if_missing = function(p) {
if (p %in% rownames(installed.packages()) == FALSE) {
View most-viewed-stack-overflow-questions.sql
'' + CONVERT(VARCHAR, Posts.Id) as url,
ViewCount / (SELECT -DATEDIFF(DAY, GETDATE() , CreationDate))
) AS ave_views_per_day,
LEFT JOIN PostTags ON Posts.Id = PostTags.PostId
LEFT JOIN Tags ON PostTags.TagId = Tags.Id
stevecondylios / install-r-and-rstudio-on-windows-with-powershell
Last active Dec 17, 2019
Powershell script to install both R and RStudio on Windows. NOTE: there are a couple of links in the script below - update them to ensure you install most recent versions
View install-r-and-rstudio-on-windows-with-powershell
$dir = $env:TEMP;
Set-Location $dir
$urlRStudio = ""
$outputRStudio = "$dir\RStudio.exe"
$wcRStudio = New-Object System.Net.WebClient
$wcRStudio.DownloadFile($urlRStudio, $outputRStudio) # $PSScriptRoot
$urlR = ""
stevecondylios /
Last active Apr 11, 2021
Tutorial: Create and Deploy a Contact Form to Production in Ruby on Rails 5

Create a Contact Form in Rails 5

This is a complete, step-by-step tutorial showing how to create a fully functional contact form in production in rails 5. Rather than reinvent things, the following borrows from the best available documentation and tutorials (most notably, this tutorial on making a contact form in development). The finished contact form can be viewed here.

This tutorial uses:

  • heroku for deployment,
  • gmail for the mailer, and
  • github for version control

It would be a good idea to create a new gmail account to use for your mailer now, if you haven't already. If you haven't yet got a heroku account and installed the heroku CLI, it would be easiest to do so now.