Skip to content

Instantly share code, notes, and snippets.

View jpalala's full-sized avatar
🎯
Focusing

Jose Palala jpalala

🎯
Focusing
View GitHub Profile
@jpalala
jpalala / dnd-game.programmers.md
Created October 5, 2020 05:13
an idea for a dnd for programmers

roles: ui/frontend linux/devops guy fullstack dev

level up:

  • trainee: 0 contributions, still studying
  • mage
  • 1: 1-3 contributions
  • 2: 4-7 contributions
@jpalala
jpalala / gist:0592f349a6b9e355557a3fc24b6fd5dc
Last active September 24, 2020 04:37
intro to inertiajs

From https://reinink.ca/articles/introducing-inertia-js

I've recently abandoned server-side rendering entirely in my Laravel projects in favour of a fully Vue.js based front-end. There's a base template, which contains a single div, used as the root Vue.js container. That div has two data attributes, a component name, and component data (props). This is used to tell Vue.js which page component to display, and also provide the data (props) required for it.

<html>
<head>
    // …
@jpalala
jpalala / dst.js
Created August 19, 2020 02:15
timezone from bombay
export function getDSTOffset(dst = true) {
//DST enabled
if(dst) {
const dst_offsets = {
bombay: 5.5,
philippines: 8,
london: 1,
denver: -6,
new_york: -4
}
@jpalala
jpalala / etc_hosts.md
Created August 18, 2020 02:33
fb block

Copy this to your /etc/hosts

############################################
# To Completely Block Facebook
# Add these entries below to your hosts file
#
# Your hosts file Location:
# Linux, Unix and Mac OS X  -> /etc/hosts
# Windows XP, Vista and Windows 7 ->  C:WINDOWSsystem32driversetchosts
@jpalala
jpalala / _event-sourcing-cqrs-sample
Created August 12, 2020 03:55 — forked from justinyoo/_event-sourcing-cqrs-sample
Event Sourcing and CQRS Pattern for Angular App
This is a sample code for Event Sourcing and CQRS pattern.
* http://blog.aliencube.org/ko/2015/11/12/building-applications-on-cloud-with-event-sourcing-pattern-and-cqrs-pattern/
@jpalala
jpalala / ThrottleRequests.php
Created August 11, 2020 04:02 — forked from developerdino/ThrottleRequests.php
Lumen Middleware for rate limiting - based on Laravel's implementation.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Cache\RateLimiter;
class ThrottleRequests
{