Skip to content

Instantly share code, notes, and snippets.

Evolving from a single person managing all aspects of a website.

graph TD
    A[Web Presence Management] -->|Creates Content| B[Single Person]
    A -->|Updates Website| B
    A -->|Handles SEO| B
    A -->|Manages Social Media| B
    A -->|Responds to Inquiries| B
@afomi
afomi / Code.gs
Created May 31, 2024 21:44
list_times_in_google_calendar - google app script
// To list available Google Calendar times as text
// Create this function at https://script.google.com/
// Run the app and authorize it access Google Calendar
//
function listAvailableTimes() {
// Define the calendar and the time period to check for availability
var calendarId = 'primary'; // Use 'primary' for the primary calendar or the calendar ID for a specific calendar
var startTime = new Date(); // Start from the current time
@afomi
afomi / leaflet.html
Last active May 6, 2024 13:47
Simple Leaflet.js Map Example
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
<style>
#map { height: 500px; }

What are the foundational documents for a city in california?

The foundational documents for a city in California, typically involve a set of core legal and organizational documents that define the governance, responsibilities, and operations of the city. These documents often include:

  • City Charter: Not all cities have a charter, but for those that do, the charter acts as the "Constitution" for the city. It outlines the organizational structure, powers, and functions of the city government. Charters are approved by the voters of a city.
  • Municipal Code: This is a comprehensive collection of the laws and ordinances adopted by the city council. It covers a wide range of regulations, including zoning, public safety, and building codes.
  • General Plan: A long-range planning document that serves as a blueprint for the city's future growth and development. It addresses various elements such as land use, housing, transportation, and environmental quality.
  • Annual Budget: This document details the city's fi
# script.rb
require 'yaml'
# Load the existing configuration
config = YAML.load_file('_config.yml')
# Modify the configuration using ENV variables
config['some_setting'] = ENV['MY_ENV_VARIABLE'] || 'default_value'
# Write the modified configuration to a new file
require 'csv'
# Define the file name
file_name = "sample_data.csv"
# Define the number of rows and columns
num_rows = 10000
num_columns = 12
# Open a CSV file for writing
@afomi
afomi / .md
Created January 9, 2023 04:01 — forked from mbajur/.md
How to create small, unique tokens in Ruby

How to create small, unique tokens in Ruby

That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:

My choice: Dave Bass’s rand().to_s() trick

Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):

@afomi
afomi / Blockchain Working Group Decision Making Process.md
Last active February 3, 2020 20:51
Blockchain Working Group Decision Making Process
@afomi
afomi / growing-an-idea-into-a-business.md
Created August 17, 2019 23:16
Growing an Idea into a Business

From idea to business

  • idea
  • flesh out the idea: requires a business model.
  • the business model needs to be validated.
    • is there a market? who?
    • can access/address the market? (eg: sale a real thing)
  • is there enough to offer? what is the minimum viable product or service?
@afomi
afomi / dev-walkthrough.html
Created August 6, 2019 23:16
setting up a dev environment
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"select a language" -> "language"
"language" -> "ruby"
"language" -> "python"
"language" -> "javascript"
"language" -> "language selected"
"language selected" ->
"setup local dev environment"
}