Skip to content

Instantly share code, notes, and snippets.

View erikyuzwa's full-sized avatar

Erik Yuzwa erikyuzwa

View GitHub Profile
@erikyuzwa
erikyuzwa / .bash_profile
Created March 19, 2017 18:42 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@erikyuzwa
erikyuzwa / he_had_a_year_to_do_it_in.txt
Created April 1, 2018 19:57
he had a year to do it in
He had a year to do it in
So brushed the thought away,
A chap with half his energy
Might do it in a day.
A year! ‘Twas too ridiculous,
As everyone should find;
However, he would get it done
And have it off his mind.
But not today. A few months hence would suit him better still;
/**
* subscriptions data format:
* { eventType: { id: callback } }
*/
const subscriptions = { };
const getNextUniqueId = getIdGenerator();
function subscribe(eventType, callback) {
const id = getNextUniqueId();
@erikyuzwa
erikyuzwa / spring-boot-one-liner.md
Last active December 8, 2019 21:17
java spring project one liner from curl

setup

one liner for generating a new spring-boot project in the CURRENT folder

  • dependencies: devtools,web,data-jpa,security,session,h2,thymeleaf
  • project type: maven
  • packaging : war
curl https://start.spring.io/starter.zip -d packaging=war -d dependencies=devtools,web,data-jpa,security,session,h2,thymeleaf -d type=maven-project -d baseDir=. | tar -xzvf -
#!/usr/bin/env ruby
# 1 pound = 0.453 kg
def pounds_to_kg(pounds = 0.00)
if (pounds < 1.0)
0.00
else
(pounds / 2.205).round(2)
end
end
@erikyuzwa
erikyuzwa / wordpress-6-2-2-docker-compose.yml
Last active April 17, 2024 17:00
Wordpress 6.2.2 Docker Compose for Local Development
# create a local .env file with the following 4 properties:
#
# MYSQL_DATABASE=<something>
# MYSQL_USER=<something>
# MYSQL_PASSWORD=<something>
# MYSQL_ROOT_PASSWORD=<something>
#
# Note: I have had a LOT of issues working with anything newer then Docker Desktop v4.26.1
# If you're on something newer, then double check against this release.
#
// Currently making use of the SDL3.1.0 Preview release
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char* argv[])
{
SDL_Window* window = NULL;
SDL_Renderer* renderer = NULL;