Skip to content

Instantly share code, notes, and snippets.

View joparara's full-sized avatar

Joe Palala joparara

View GitHub Profile
@joparara
joparara / Response.php
Created November 17, 2023 23:35 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@khromov
khromov / service-worker.ts
Created April 10, 2023 21:17
SvelteKit service worker example
/// <reference types="@sveltejs/kit" />
/// <reference no-default-lib="true"/>
/// <reference lib="esnext" />
/// <reference lib="webworker" />
// https://kit.svelte.dev/docs/service-workers#type-safety
const sw = self as unknown as ServiceWorkerGlobalScope;
import { build, files, version } from '$service-worker';
@martinwoodward
martinwoodward / mermaid.md
Created February 11, 2022 20:34
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe-&gt;&gt;dotcom: iframe ready
@Bill-tran
Bill-tran / how-to-install-openssl-1.1.1-on-centos-7.md
Created September 7, 2021 09:22
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@VottusCode
VottusCode / app-Facades-Hash.php
Last active May 15, 2024 05:27
Simple implementation of AuthMe SHA256 as a Laravel Facade.
<?php declare(strict_types=1);
namespace App\Facades;
use Illuminate\Contracts\Hashing\Hasher;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Str;
/**
* Hasher implementation that supports
@dontlaugh
dontlaugh / networks.ts
Last active October 25, 2024 08:14
Deno AWS cli example
#!/usr/bin/env -S deno run --allow-read --allow-net --allow-run
/*
This script prints out a list of VPCs, subnets, and route tables.
The output will be different depending on which AWS account you are
connected to.
*/
const {stdout, copy} = Deno;
import iro, {
bold, red, dim, yellow, white, blue, cyan, green
@jeffochoa
jeffochoa / Response.php
Last active March 11, 2025 20:15
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@jeffochoa
jeffochoa / 1.ProcessClass.php
Last active October 1, 2024 02:07
Understanding Laravel pipelines
<?php
namespace App\Features;
use App\Features\FirstTask;
use App\Features\SecondTask;
use Illuminate\Pipeline\Pipeline;
// *Naming things is hard* ... So, this is a class called `ProcessClass` that `run()` some text ¯\_(ツ)_/¯
class ProcessClass
@guilsa
guilsa / 0_readme.md
Last active February 14, 2024 10:24
Steps for implementing Bower, RequireJS and Knockout

##Purpose

To learn basic configuration of RequireJS and require.config.

##Why RequireJS

RequireJS is useful for building modularized enterprise JavaScript applications.

  • we no longer have to control file loading, RequireJS does it elegantly for us
  • creation of modules (even though ES6 provides module loading, RequireJS came prior and is very stable)
@thomasjsn
thomasjsn / laravel-queue.service
Last active April 19, 2025 12:34
Laravel queue worker using systemd.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker