Skip to content

Instantly share code, notes, and snippets.

@johntday
johntday / gist:6629132
Created September 19, 2013 20:08
Jekyll template for generating simple `sitemap.xml` for Google indexing.
---
layout: nil
title : "My Sitemap"
sitemap_exclude: y
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}
<url>
<loc>{{site.production_url}}{{ post.url | remove: 'index.html' }}</loc>
@johntday
johntday / yuml.markdown
Last active March 30, 2017 01:05
yuml test

yUML Test On GitHub

yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.

Here's an idea of how it could be used in your repository readme.markdown or wiki.

We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 44 columns, instead of 24 in line 3.
name,pokedex_number,evolution,abilities,against_bug,against_dark,against_dragon,against_electric,against_fairy,against_fight,against_fire,against_flying,against_ghost,against_grass,against_ground,against_ice,against_normal,against_poison,against_psychic,against_rock,against_steel,against_water,attack,base_egg_steps,base_happiness,base_total,capture_rate,classfication,defense,experience_growth,height_cm,height_m,hp,japanese_name,percentage_male,sp_attack,sp_defense,speed,type1,type2,weight_kg,generation,is_legendary,weight_g
Bulbasaur,1,2,"['Overgrow', 'Chlorophyll']",1,1,1,0.5,0.5,0.5,2,2,1,0.25,1,2,1,1,2,1,1,0.5,49,5120,70,318,45,Seed,49,1059860,70,0.7,45,Fushigidaneフシギダネ,88.1,65,65,45,grass,poison,6.9,1,0,6900
Ivysaur,2,3,"['Overgrow', 'Chlorophyll']",1,1,1,0.5,0.5,0.5,2,2,1,0.25,1,2,1,1,2,1,1,0.5,62,5120,70,405,45,Seed,63,1059860,100,1,60,Fushigisouフシギソウ,88.1,80,80,60,grass,poison,13,1,0,13000
Venusaur,3,,"['Overgrow', 'Chlorophyll']",1,1,1,0.5,0.5,0.5,2,2,1,0.25,1,2,1,1,2,1,1,0.5,100,5

React Context - Example


1. Create a Cart Context:

import React, { createContext, useContext, useState } from 'react';

const CartContext = createContext();
# POSTGRES
POSTGRES_URL="fixme"
POSTGRES_PRISMA_URL="fixme"
POSTGRES_URL_NO_SSL="fixme"
POSTGRES_URL_NON_POOLING="fixme"
POSTGRES_USER="default"
POSTGRES_HOST="fixme"
POSTGRES_PASSWORD="fixme"
POSTGRES_DATABASE="verceldb"
@johntday
johntday / gist:900c8e08f676deebbf671fb85d0eee0c
Created December 18, 2024 20:31
Impact of a New Trump Presidency on Immigrants
# Impact of a New Trump Presidency on Immigrants
#### Date: 18/12/2024
## Introduction
The potential return of Donald Trump to the U.S. presidency in 2024 has reignited discussions and concerns regarding the future of immigration policy in the United States. During his first term, President Trump implemented a series of restrictive immigration policies that significantly altered the landscape for immigrants, international students, and businesses reliant on foreign talent ([StudyCorgi](https://studycorgi.com/shifts-in-u-s-immigration-policies-historical-and-political-influences/)). These policies were characterized by reduced refugee admissions, increased scrutiny on visa applications, and heightened enforcement measures, reflecting a broader anti-immigration sentiment within the administration ([Forbes](https://www.forbes.com/sites/stuartanderson/2024/11/03/trumps-immigration-plans-may-upend-students-and-immigrant-applicants/)).
As the possibility of a second Trump presidency looms, stakeholders are bracin
@johntday
johntday / gist:eebb7f8928bbdfe45ca19a71fd990b80
Created December 22, 2024 17:23
Devon: The Cutting-Edge AI Coding Assistant
## Introduction
In the rapidly evolving landscape of software development, the introduction of AI-driven tools has marked a significant shift in how projects are conceptualized, developed, and deployed. Among these innovations, Devon stands out as a cutting-edge AI coding assistant that redefines the boundaries of autonomous software engineering. Unlike traditional AI tools that primarily offer code suggestions and error detection, Devon is engineered to autonomously manage entire software development projects from inception to deployment. This includes understanding project requirements, composing code, resolving bugs, and deploying applications, thereby transforming project outlines into fully functional applications ([Codemotion](https://www.codemotion.com/magazine/ai-ml/devin-a-new-end-to-end-ai-programming-tool/)).
Devon's integration with platforms like Slack and GitHub enhances its utility in collaborative environments, facilitating seamless collaboration and improving team productivity through effici
@johntday
johntday / gist:77b2a12e95c4fc4875662e7a0369e190
Created December 22, 2024 17:36
Comparative Analysis of Devon and Cursor AI Coding Assistants
## Introduction
In the rapidly evolving landscape of software development, AI-driven coding assistants have emerged as pivotal tools for enhancing developer productivity and efficiency. Among these, Devon and Cursor stand out as prominent solutions, each offering unique features and capabilities tailored to different developer needs. Devon, an open-source AI pair programmer, is designed to operate as a standalone tool, providing multifile editing and codebase exploration capabilities, particularly in Node.js and Python environments ([Geeky Gadgets](https://www.geeky-gadgets.com/ai-coding-assistant-devon/)). In contrast, Cursor integrates directly into Integrated Development Environments (IDEs), offering real-time feedback and seamless interaction, which is crucial for developers who prioritize immediate feedback and interaction within their coding environment ([SeeFunnel](https://blog.seefunnel.com/view/133)).
The feature sets of these tools reflect their distinct approaches to enhancing the coding process.
@johntday
johntday / gist:5b4d31e5fa441259627fd2803ef38c5d
Created December 28, 2024 20:57
Exploring the Possibility of Faster-Than-Light Travel
## Introduction
The quest to transcend the cosmic speed limit set by the speed of light has long captivated the imagination of scientists and science fiction enthusiasts alike. At approximately 299,792 kilometers per second, the speed of light represents a fundamental barrier in our current understanding of physics, as dictated by Einstein's theory of general relativity ([Wikipedia](https://en.wikipedia.org/wiki/Faster-than-light)). This theory posits that as an object approaches the speed of light, its mass becomes infinite, necessitating infinite energy for further acceleration, thus rendering faster-than-light (FTL) travel seemingly impossible. However, the manipulation of spacetime itself, as allowed by general relativity, opens intriguing theoretical possibilities for FTL travel without violating this cosmic speed limit ([ScienceAlert](https://www.sciencealert.com/faster-than-light-travel-is-possible-within-einstein-s-physics-astrophysicist-shows)).
Theoretical models such as the Alcubierre warp drive p
@johntday
johntday / gist:f2a5124de00d786165668972f49f7718
Created January 6, 2025 20:48
Top 3 Predictions for 2025
## Introduction
As we navigate through 2025, the world stands at the cusp of transformative changes driven by technological advancements, economic shifts, and a heightened focus on sustainability. The rapid evolution of artificial intelligence (AI) is reshaping industries, with generative AI poised to revolutionize content creation across sectors such as advertising and entertainment. This technology is projected to expand significantly, potentially reaching a market value of $60 billion by 2025 ([Analytics Insight](https://www.analyticsinsight.net/artificial-intelligence/the-future-is-here-5-ai-trends-that-will-dominate-2025)). Concurrently, autonomous AI agents are expected to redefine autonomy by performing complex tasks independently, enhancing efficiency and user engagement ([Geeky Gadgets](https://www.geeky-gadgets.com/ai-predictions-for-2025/)).
In the economic realm, geopolitical tensions and technological advancements are reshaping global trade dynamics. The re-election of Donald Trump has introduc