Skip to content

Instantly share code, notes, and snippets.

View KyrosDigital's full-sized avatar

Nathan Jean KyrosDigital

View GitHub Profile
@KyrosDigital
KyrosDigital / memorySizeOfObject.js
Created November 2, 2017 14:18
calculate memory size of javascript object, it is not a accurate value!
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
break;
case 'string':
@KyrosDigital
KyrosDigital / kyrosMoment.js
Last active January 12, 2019 05:21
Kyros Moment, takes valid date object input, and returns pretty and nice formatted time and date data
export const kyrosMoment = (input) => {
let date = new Date(input);
const months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
const days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
const dd = date.getDate();
const dayName = days[date.getDay()];
const mm = date.getMonth();
const month = months[mm];
const yyyy = date.getFullYear();
const hours = date.getHours();
@KyrosDigital
KyrosDigital / config
Created May 29, 2020 11:39
Kyros VSCODE
here is the config

Here are the best practices for Kyros team

React Native - New Projects

While trying to run the app in release mode on Android, there are potential issue you can run into:

If you see this error: AAPT: error: resource android:attr/colorError not found. follow this post and add this to your android build.gradle file:

subprojects {
    afterEvaluate {

project ->

@KyrosDigital
KyrosDigital / fix_openssl_catalina.sh
Created September 22, 2020 21:47 — forked from FootballFan141/fix_openssl_catalina.sh
fix missing openssl files in catalina
#!/bin/bash
echo 'update brew'
brew update
echo 'upgrade brew'
brew upgrade