Skip to content

Instantly share code, notes, and snippets.

View karlmonson's full-sized avatar

Karl Monson karlmonson

View GitHub Profile
@karlmonson
karlmonson / Giddget.js
Last active April 28, 2022 22:49
A Scriptable iOS widget for tracking the price of Giddy Coin
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: cyan; icon-glyph: magic;
// ----------------------------------------------------------
// The Giddget - A Giddy Price Widget for iOS
// Giddy Tip Jar: 0x7E217ed7c2b03ec4bb163341875fd7cA5e4c726e
// ----------------------------------------------------------
// Theme Options - 'light' or 'dark'
const theme = 'light'
<?php
/*
* Locker Problem
* Author: Karl Monson
* URL: https://github.com/karlmonson
* Resource: http://mathforum.org/library/drmath/view/54242.html
*/
$lockers = array();
for($i = 0; $i <= 1000; $i++){
<?php
/*
* Fibonacci Example
* Author: Karl Monson
* URL: https://github.com/karlmonson
*/
function fibonacci($num) {
if($num == 0) return 0;
if($num == 1) return 1;
return fibonacci($num - 1) + fibonacci($num - 2);
@karlmonson
karlmonson / FizzBuzz.php
Created October 7, 2015 22:06
FizzBuzz Example
<?php
/*
* FizzBuzz Example
* Author: Karl Monson
* URL: https://github.com/karlmonson
*/
for($i = 0; $i <= 100; $i++) {
if($i % 3 == 0 && $i % 5 == 0) {
echo 'FizzBuzz';