Skip to content

Instantly share code, notes, and snippets.

View Lorezz's full-sized avatar
Working from home

Lorenzo Ponticelli Lorezz

Working from home
View GitHub Profile
@Lorezz
Lorezz / git-deployment.md
Created May 5, 2025 08:21 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@Lorezz
Lorezz / index.ts
Created December 12, 2024 14:25 — forked from rishi-raj-jain/index.ts
Google OAuth 2.0 on the Edge with Hono and Cloudflare Workers
// Do enable nodejs_compat
// https://developers.cloudflare.com/workers/runtime-apis/nodejs/
import crypto from 'node:crypto'
import { Context, Hono } from 'hono'
const app = new Hono()
function generateJWT(payload, secret, expiresIn) {
const header = { alg: 'HS256', typ: 'JWT' }
const encodedHeader = base64UrlEncode(JSON.stringify(header))
@Lorezz
Lorezz / dataviz-sample-data.json
Last active October 17, 2024 13:26
Sample parse and results pa-stats to dataviz-json
[
[
"_",
"2024-09-18",
"2024-09-19",
"2024-09-20",
"2024-09-21",
"2024-09-22"
],
[
@Lorezz
Lorezz / GitCommitEmoji.md
Created September 11, 2024 06:43 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@Lorezz
Lorezz / rss-lambda.js
Last active September 13, 2021 05:39
Rss netlify function
const https = require("https");
async function getPosts() {
return new Promise((resolve, reject) => {
const query = `
query {
microblogCollection {
items {
sys {
firstPublishedAt
@Lorezz
Lorezz / stylus_basecamp_darkmode.css
Last active April 21, 2021 12:51
stylus_basecamp_darkmode
/* Work in progress.
A Basecamp 3 dark theme for Stylus
(https://addons.mozilla.org/en-US/firefox/addon/styl-us/)
based on https://userstyles.org/styles/177262/basecamp-insomnia */
:root {
--bg-md: #2f2f2f;
--bg-md-2: #454545;
--bg-lt: #1c1c1e;
--bg-dk: #232527;
--bg-primary: #272727;
@Lorezz
Lorezz / machine.js
Last active February 13, 2021 16:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Lorezz
Lorezz / machine.js
Created February 9, 2021 14:33
Generated by XState Viz: https://xstate.js.org/viz
const saveOrder = assign({
order: (context, event) => {
console.log('ev', event);
return event.data;
},
});
function hasCustomer(context, event) {
console.log('event', event);
@Lorezz
Lorezz / machine.js
Created February 9, 2021 14:19
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Lorezz
Lorezz / machine.js
Last active February 9, 2021 13:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions