Skip to content

Instantly share code, notes, and snippets.

View jkga's full-sized avatar
🎭
Contributing to OSS while on Enhanced Community Quarantine

kenabella jkga

🎭
Contributing to OSS while on Enhanced Community Quarantine
  • SEARCA ( South East Asian Regional Center for Graduate Study and Research in Agriculture
  • Laguna,Philippines
View GitHub Profile
@jkga
jkga / WebViewAutoHeight.js
Last active December 2, 2021 10:42
React Native: Make an autoheight WebView inside ScrollView
import React, { useState } from 'react'
import { Dimensions} from 'react-native'
import { WebView } from 'react-native-webview'
export default (props) => {
const [webViewHeight, setWebViewHeight] = useState(10)
const onWebViewMessage = (event) => {
@jkga
jkga / media-query.css
Created April 7, 2020 02:01 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@jkga
jkga / reader.js
Last active February 19, 2020 15:57
NodeJS : Reading bulk file using stream (ReadLine)
const path = require('path')
const fs = require('fs')
const readline = require('readline')
const start = new Date()
const hrstart = process.hrtime()
const file = path.resolve(__dirname, "log.txt")
fs.stat(file, (err) => {
if(err === null) {
let lines = 0 // counter
@jkga
jkga / localhost
Last active September 28, 2020 07:11
enable https(SSL) in localhost (https://localhost) -for WINDOWS 10
1.) download openssl
> https://www.cloudinsidr.com/content/how-to-install-the-most-recent-version-of-openssl-on-windows-10-in-64-bit/
2.) run openssl comand line - C:\OpenSSL-Win64\bin
3.) Generate rootCA - certification authority
> genrsa -des3 -out rootCA.key 2048
> req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
> x509 -outform pem -in rootCA.pem -out rootCA.crt
> please refer to full article https://www.freecodecamp.org/news/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec/
4.) Click the generated "rootCA.crt" and select "install" > "local machine" > browse from stores > "Trusted Root Certification Authorities"
5.) create new file "server.csr.cnf"
@jkga
jkga / esp2866.md
Last active December 3, 2019 04:31
NodeMCU Esp8226 v.3 Digital Pinouts

ESP8266 Digital Pinout

static const uint8_t D0 = 16;
static const uint8_t D1 = 5;
static const uint8_t D2 = 4;
static const uint8_t D3 = 0;
static const uint8_t D4 = 2;
static const uint8_t D5 = 14;
static const uint8_t D6 = 12;
static const uint8_t D7 = 13;

@jkga
jkga / Globe4gLTE.md
Created December 7, 2018 16:08 — forked from pongstr/Globe4gLTE.md
Access to Globe Broadband's Azatech DSL5001EN Router

Globe 4G LTE (Internet Only)

Noob access to administer your local area network and wifi access:

http://192.168.254.254

username: user
password: @l03e1t3
@jkga
jkga / app-style.js
Created June 21, 2018 15:52
Adding style inside Vue components' template without using vue-loader
// app-style.js
// adding <style></style> directly inside template will result in error or empty element which
// this component is trying to address
// this will allow you to dynamically insert css inside Vue template without the use of vue loader
// or if you do not want to use .vue extension at all
// however it doesnt really apply scope css (for now).
export default {
name: 'app-style',
data: function(){
return {
@jkga
jkga / dbcon.php
Created February 13, 2017 07:22
A PHP wrapper to connect to different databases using PHP Data Objects extension (PDO) ex. mysql, mysqli, postgressSQL
<?php
class DBCON{
/**
*initialize all the components for database
*
*allow you to construct parallel database session using different dbms like mysql,pgsql etc.
*
*@param string $db_ini_dbms set your current database management system
*@param string $db_ini_host set your host ex.127.0.0.1
*@param string $db_ini_username set your username ex. root