Skip to content

Instantly share code, notes, and snippets.

Here are two simple recipes for making Garlic Spray and Vinegar Spray to deter squirrels and birds in a garden:

1. Garlic Spray Recipe

Garlic has a strong odor that can help repel squirrels, birds, and other pests.

Ingredients:

  • 10-12 cloves of garlic (or 2-3 tablespoons of minced garlic)
  • 1 liter (about 4 cups) of water
  • 1 teaspoon of dish soap (optional, helps the spray stick to plants)
  • A fine-mesh strainer or cheesecloth

To identify spam programmatically across a large dataset of survey responses across surveys, you can take a multi-pronged approach that includes statistical analysis, machine learning, and heuristic-based methods. Here’s a strategy you can implement:

1. Heuristic-Based Rules for Identifying Spam

Start by defining clear rules that could help flag potentially suspicious responses. These rules should be tuned to the nature of your surveys but might include the following:

  • Repeated Entries from the Same IP: Responses coming from the same IP address multiple times in a short period might indicate spam.
  • Unrealistic Completion Times: Responses completed too quickly or too slowly compared to the average time could be flagged. If the time to complete a survey is abnormally fast, it might suggest the respondent didn’t provide genuine answers.
  • Uniform or Repetitive Answers: If responses to multiple questions are identical (e.g., all answers are “1” or "Yes"), it could indicate spam

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