Skip to content

Instantly share code, notes, and snippets.

View kuya-joe's full-sized avatar

Joe kuya-joe

View GitHub Profile
@kuya-joe
kuya-joe / hubot-digitalocean.md
Created December 13, 2015 21:57 — forked from trdarr/hubot-digitalocean.md
Deploying Hubot on DigitalOcean (with Slack integration)
@kuya-joe
kuya-joe / canvbackbone.md
Created January 7, 2016 04:07 — forked from moschel/canvbackbone.md
CanJS vs Backbone

Backbone helps you structure your application. This is great, but it doesn't solve the whole problem. CanJS helps you structure your application and lets you actually focus on the part that matters, which is your data.

CanJS essentially gives you all the simplicity of Backbone (model and control layer and no weird asynchronous event loop like Ember and Angular), along with more advanced features that make writing apps much faster and the code more maintainable.

Backbone is popular because its very simple and easy to understand. They are aiming for that level JUST above basic jQuery development, people who just learned jQuery and are looking for a way to organize their code a bit more. It provides this. So does CanJS. But for large complex applications, Backbone lacks a lot of the things we need to make a great app.

Live Binding

Backbone has no concept of binding data object and their changes to your templates.

@kuya-joe
kuya-joe / data.json
Created May 22, 2020 02:50
pinadb.com
{
"hello": "world",
"persons": [
{"id" : 1, "name": "Joe Palala", "[email protected]"}
]
}
@kuya-joe
kuya-joe / index.js
Created May 22, 2020 04:21 — forked from jwo/index.js
Simple way to sign in with github for oAuth in Node/Express
const express = require("express")
const app = express()
var passport = require("passport")
var session = require("express-session")
var GitHubStrategy = require("passport-github2").Strategy
const GITHUB_CLIENT_ID = "your-client-id-here" // or get from process.env.GITHUB_CLIENT_ID
const GITHUB_CLIENT_SECRET = "your-client-secret-here" // or get from process.env.GITHUB_CLIENT_SECRET
const GITHUB_CALLBACK_URL = "http://localhost:5000/auth/github/callback" // or get from process.env.GITHUB_CALLBACK_URL
@kuya-joe
kuya-joe / the-new-way-of-tdd.md
Created June 23, 2020 06:47
observation driven
@kuya-joe
kuya-joe / class.CreateReadUpdate.php
Created January 5, 2021 06:44
safe-mysql-object-oriented
require_once(dirname(__FILE__).'/class.MySQL.php');
class CreateReadUpdate extends MySQL{
public function __construct(){
parent::__construct();
}
public function insert(){
@kuya-joe
kuya-joe / DNS_TO_LOCALHOST.markdown
Created June 30, 2021 04:26 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing To localhost (127.0.0.1)

Available Wildcarded DNS Domains

It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any domain below and/or any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
  • [*.]yoogle.com
@kuya-joe
kuya-joe / bulmalite.js
Created July 2, 2021 15:11
bulma with no modals-panel tabs
/* bulmajs (github.com/VizuaaLOG/BulmaJS) with no modals and paneltabs */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Bulma",[],t):"object"==typeof exports?exports.Bulma=t():e.Bulma=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n
@kuya-joe
kuya-joe / composer.json
Created July 5, 2021 03:28 — forked from jibone/composer.json
My generic composer file for a PHP project.
{
"require": {
"php": ">=5.3.1",
"behat/behat": "2.4.*@stable",
"behat/mink": "1.4@stable",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-sahi-driver": "*",
"behat/mink-selenium-driver": "*",
"behat/mink-selenium2-driver": "*",
@kuya-joe
kuya-joe / fix-001.md
Last active October 2, 2021 04:29
fixing corrupted yum lock or rpm db

Fix rpmdb: Thread died in Berkeley DB library

Source

mkdir /var/lib/rpm/backup
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa