Skip to content

Instantly share code, notes, and snippets.

View zachary's full-sized avatar

Zachary - Full Stack & DevOps & ML zachary

View GitHub Profile
{
"AWSEBDockerrunVersion":"1",
"Image": {
"Name": "docker.io/securingdevops/invoicer",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8080"
}
@zachary
zachary / all.css
Last active September 7, 2025 20:17
all.css
/* Selectors */
* { /* Universal */ }
element { /* Type */ }
.class { /* Class */ }
#id { /* ID */ }
[attribute] { /* Attribute */ }
a:hover { /* Pseudo-class */ }
div::after { /* Pseodo-element */ }
/* Box Model */
@zachary
zachary / js-promise.js
Created August 14, 2025 23:52
js promise
/**
* Java Script Promises Cheatsheet (Part 1)
* created by @e_opore on X
* Core Basics & Consumption
*/
// 1) creating a promise
const p = new Promise((resolve, reject) => {
const ok = true;
if (ok) resolve("done");
else reject(new Error("nope"));
@zachary
zachary / Laravel-Scheduler-Windows.md
Created June 10, 2025 02:01 — forked from Splode/Laravel-Scheduler-Windows.md
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@zachary
zachary / Deploying a Laravel app on Windows using IIS.md
Last active June 7, 2025 20:42 — forked from amestsantim/Deploying a Laravel app on Windows using IIS.md
We try to describe the steps required to deploy a Laravel application on a Windows machine using IIS

Deploying a Laravel app on Windows using IIS

Install IIS

  1. Open Server Manager: Start the Server Manager from the Start menu or taskbar.
  2. Add Roles and Features: Click on "Manage" in the top right corner of the Server Manager, then select "Add Roles and Features".
  3. Role-based or Feature-based Installation: Choose "Role-based or feature-based installation" and click "Next".
  4. Select the Server: Select the server on which you want to install IIS and click "Next".
  5. Select Server Roles: In the roles list, check the box next to "Web Server (IIS)". This action will prompt you to add features that are required for Web Server (IIS); accept these by clicking "Add Features".
  6. Features: No additional features are required at this point, so you can click "Next".
/* Reset some default styles and provide a clean slate */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Apply a simple, elegant font to the entire page */
body {
font-family: 'Arial', sans-serif;
}
// Variable Declarations
let x;// Declares a block-scoped variable
const y = 10; // Declares a block-scoped. read-only constant
// Functions
function myFunction() {
//Function declaration
}
const myFunction = () = {
//Arrow unction exeression
}
/*** ES6 Features ***/
// Let and Const
let variableName = "value"; // Block-scoped, can be reassigned
const constantName = "value"; // Block-scoped, cannot be reassigned
// Arrow Functions
const myFunction = (param) => {
return param * 2;
}
// Template Literals
const greeting = `Hello, $(name)!` // Embedded expressions
//*** Document Methods ***
document.getElementById('id'); // Returns the element with the specified id
document.getElementsByTagName ('tag');
// Returns a live HTMLCollection of elements with the specified tag name
document.getElementsByClassName ('class');
// Returns a live HTMLCollection of elements with the specified class name
document.createElement('tag'); // Creates and returns a new element of the specified type
document.createTextNode( 'text'); // Creates a new text node with the specified text
document.setAttribute('attr', 'value');
// Sets the value of an attribute on the specified element
@zachary
zachary / bag-of-word-vectors.py
Created February 28, 2024 19:11 — forked from edubey/bag-of-word-vectors.py
Code to generate bag of word vectors in Python
# import statments
import numpy
import re
'''
Tokenize each the sentences, example
Input : "John likes to watch movies. Mary likes movies too"
Ouput : "John","likes","to","watch","movies","Mary","likes","movies","too"
'''
def tokenize(sentences):