Skip to content

Instantly share code, notes, and snippets.

View AlwinaO's full-sized avatar

Alwina Oyewoleturner AlwinaO

View GitHub Profile
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active May 1, 2025 08:36
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@vollnhals
vollnhals / pg_interval_rails_5_1.rb
Last active July 13, 2020 13:44
Implementation of interval database type in Rails 5.1
# implementation from https://github.com/rails/rails/pull/16919
# activerecord/lib/active_record/connection_adapters/postgresql/oid/interval.rb
require "active_support/duration"
module ActiveRecord
module ConnectionAdapters
module PostgreSQL
function makeRequest(url) {
httpRequest = new XMLHttpRequest();
if (!httpRequest) {
displayErrorMsg('Sorry, there was a problem making the request!');
return false;
}
httpRequest.onreadystatechange = receiveRequest;
httpRequest.open('GET', url);
httpRequest.send();
}
@vraravam
vraravam / fresh-install-of-osx.sh
Last active July 9, 2024 14:19
Steps to get "up and running" with new Mac OSX
This script has been moved here: https://github.com/vraravam/dotfiles
@glnds
glnds / README-Template.md
Last active September 27, 2024 09:49 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Name

Project description: A good description is clear, short, and to the point. Describe the importance of your project, and what it does.

(Table of Contents)

Optionally, include a table of contents in order to allow other people to quickly navigate especially long or detailed READMEs.

Getting Started

Prerequisites

What things you need to install before you can statrt installing the software itself.

# Cleans up branches like:
# if Shopify.rails_next?
# # Rails 5 login
# else
# # Rails 4 login
# end
module RuboCop
module Cop
module ShopifyRails
class RailsNextUnless < Cop
@slavakurilyak
slavakurilyak / README.md
Last active April 18, 2024 03:11
Download images stored as URLs from a CSV file

Download images stored as URLs from a CSV file

Dealing with a image dataset? Dealing with CSVs intead of JPGs? Use this script to download images from a CSV file, which were originally stored as URLs.

Usage

To download full resolution images, type:

$ python download-images-from-csv.py 
@tomdalling
tomdalling / simple_authentication.rb
Created May 23, 2016 12:26
A simple Sinatra app that demonstrates basic authentication
#!/user/bin/env ruby
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'sinatra', '~> 1.4'
gem 'bcrypt', '~> 3.1'
end
require 'sinatra/base'
@mpj
mpj / 0-array.js
Last active May 25, 2023 15:48
Code to the video - "Map: Part 2 of Functional Programming in JavaScript"
var animals = [
{ name: 'Fluffykins', species: 'rabbit' },
{ name: 'Caro', species: 'dog' },
{ name: 'Hamilton', species: 'dog' },
{ name: 'Harold', species: 'fish' },
{ name: 'Ursula', species: 'cat' },
{ name: 'Jimmy', species: 'fish' }
]
@non
non / answer.md
Last active February 28, 2025 11:46
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.