Skip to content

Instantly share code, notes, and snippets.

@olowoseun
olowoseun / attributes-as-options.php
Created November 17, 2021 06:59 — forked from dazecoop/attributes-as-options.php
WooCommerce product attributes as selectable options without variations
<?php
/**
* List available attributes on product page in a drop-down selection
*/
add_action('woocommerce_before_add_to_cart_button', 'list_attributes_on_product_page');
function list_attributes_on_product_page() {
global $product;
$attributes = $product->get_attributes();
@olowoseun
olowoseun / nigeria-total-population-vs-vaccinated.csv
Last active October 1, 2021 22:26
Nigeria's total population by state against vaccinated
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 6 columns, instead of 7 in line 5.
Region,State,Population,Astra,Moderna,Total Doses Administered
South East,Abia,3727347,61152,25172,86324
North East,Adamawa,4248436,70521,36302,106823
South South,Akwa Ibom,5482177,67760,27174,94934
South East,Anambra,5527809,62171,13874,76045
North East,Bauchi,6537314,98,409,43162,141571
South South,Bayelsa,2277961,31800,9296,41096
North Central,Benue,5741815,107094,60256,167350
North East,Borno,5860183,64623,31878,96501
South South,Cross River,3866269,99813,51562,151375
@olowoseun
olowoseun / README.md
Last active October 27, 2021 08:43
CSS Named Colors
@olowoseun
olowoseun / CollectionExtensions.cs
Created May 18, 2020 17:46
ToObservableCollection
using System.Collections.Generic;
public static class CollectionExtensions {
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> list) {
var collection = new ObservableCollection<T>();
foreach(var item in list) {
collection.Add(item);
}
return collection;