Skip to content

Instantly share code, notes, and snippets.

View sumerbabel's full-sized avatar

Paul Aquino G. sumerbabel

View GitHub Profile
@sumerbabel
sumerbabel / index.html
Created May 28, 2022 23:03
Pure CSS Material Components Showcase
<header>
Pure CSS Material Components Showcase
</header>
<nav>UPDATE! This has been open-sourced here: <a href="https://github.com/finnhvman/matter" target="_top">https://github.com/finnhvman/matter</a></nav>
<main class="grid">
<div></div>
<div class="column">Enabled</div>
<div class="column">Disabled</div>
<a class="title" href="https://codepen.io/finnhvman/pen/MQyJxV" target="_top">Button - Contained</a>
@sumerbabel
sumerbabel / index.html
Created April 22, 2022 03:05
Paste Excel from Clipboard - Formats into HTML Table
<textarea rows="1" id="excelPasteBox" placeholder="Paste your excel form data here..."></textarea>
<hr />
<div id="output">
<table id="excelDataTable"></table>
</div>
<hr />
<button id="exportJsonData" type="button" value="Export JSON Data">
Export JSON Data
</button>
<hr />
@sumerbabel
sumerbabel / odoo_uninstall_process.txt
Created February 1, 2022 23:58 — forked from abdulhalim-cu/odoo_uninstall_process.txt
How to remove Odoo from Ubuntu
* Stop Server
* Remove all odoo files
* Remove postgresql from system
STOP SERVER
sudo service odoo stop
or sudo service odoo-server stop (if odoo-server instead of odoo)
REMOVE ALL ODOO FILES
sudo rm -R /opt/odoo
REMOVE CONFIG FILES
@sumerbabel
sumerbabel / Object collisions with canvas
Created September 12, 2021 15:08 — forked from joshuabradley012/Object collisions with canvas
An example of 2D collisions using JavaScript Canvas
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
@sumerbabel
sumerbabel / recurssive.tree.js
Created February 19, 2020 03:43 — forked from alonronin/recurssive.tree.js
Create recursive tree from json using lodash transform without recursion. Can have unlimited nesting.
var _ = require('lodash');
var arr = [
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"},
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"},
{"name":"parent","title":"A single parent"},
{"name":"child-parent","title":"A child parent","parent":"child1"},
{"name":"my","title":"My"},
{"name":"my2","title":"My2"},
{"name":"child1","title":"Child 1","parent":"my"},
@sumerbabel
sumerbabel / closure_table.md
Created October 4, 2019 17:49
Persistent tree structure using closure table in MySQL

Using closure tables to manage hierarchical relations in MySQL

Create DB tables

Create a table to represent tree nodes.

CREATE TABLE `tree_node` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `data_body` text,

node_deleted datetime DEFAULT NULL,