Skip to content

Instantly share code, notes, and snippets.

View Mikepicker's full-sized avatar

Michele Rullo Mikepicker

  • Anzio, RM
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Unreact - Reactivity in VanillaJS</title>
</head>
<body>
<h1>Reactive Cat Facts</h1>
<p reactive='paragraph'>This will be filled with cat stories in 5 secs!</p>
<hr />
<html>
<head>
...
</head>
<body>
...
<script>
document.addEventListener('alpine:init', () => {
Alpine.data('lists', () => ({
// VARIABLES
<html>
<head>
...
</head>
<body>
...
<script>
document.addEventListener('alpine:init', () => {
Alpine.data('lists', () => ({
// VARIABLES
<html>
<head>
...
</head>
<body>
...
<script>
document.addEventListener('alpine:init', () => {
Alpine.data('lists', () => ({
// pocketbase client
<html>
<head>
...
</head>
<body>
<div x-data="lists" class="container">
<!-- NAVBAR BLOCK -->
<!-- LOGIN / SIGNUP BLOCK -->
<!-- TODO LISTS BLOCK -->
<html>
<head>
...
</head>
<body>
<div x-data="lists" class="container">
<!-- NAVBAR BLOCK -->
<!-- LOGIN / SIGNUP BLOCK -->
<html>
<head>
...
</head>
<body>
<div x-data="lists" class="container">
<nav>
<ul>
<li>
<h1 @click="selectedList = null" style="margin:0; text-align: center; cursor: pointer">DooDoo</h1>
<html>
<head>
...
</head>
<body>
<div x-data="lists" class="container">
<nav>
<ul>
<li>
<h1 style="margin:0; text-align: center; cursor: pointer">DooDoo</h1>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="DooDoo.it - Your Pocket Todo List">
<title>DooDoo - Pocket To-Do List</title>
<script src="js/pocketbase.umd.js"></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
// Blank texture for silhouette blitting
SDL_Texture* createBlankTexture(Sint32 w, Sint32 h, SDL_TextureAccess access) {
//Create uninitialized texture
SDL_Texture* newTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, access, w, h);
if(newTexture == NULL) {
printf( "Unable to create blank texture! SDL Error: %s\n", SDL_GetError() );
}