Skip to content

Instantly share code, notes, and snippets.

View demogar's full-sized avatar
👋

Demostenes Garcia G. demogar

👋
View GitHub Profile
@demogar
demogar / TabOneScreen.tsx
Created October 24, 2022 16:25
Contextualized Dictionary with Machine Learning
import React, { useEffect, useRef, useState } from "react";
import {
Alert,
ActivityIndicator,
Image,
ScrollView,
StyleSheet,
TouchableOpacity,
} from "react-native";
import * as tf from "@tensorflow/tfjs";
const me = {
name: 'Demostenes Garcia G.',
nick: '@demogar',
location: 'Panama City, Panama',
time: 'America/Panama',
tecnologies: {
'JavaScript / TypeScript': ['Vue', 'Svelte', 'React', 'React Native'],
'State Management with React': ['Redux', 'XState', 'Context'],
'Testing on JavaScript': ['Jest', 'Enzyme', 'Mocha', 'React Testing Library'],
Ruby: ['Rails', 'Sinatra', 'Capistrano', 'Jekyll'],
@demogar
demogar / initial.ino
Last active May 2, 2022 17:34
Arduino Crypto Price change with Metro M4 Airlift (WiFi)
// ...
// Display configuration
#define SRAM_CS 8
#define EPD_CS 10
#define EPD_DC 9
#define EPD_RESET -1
#define EPD_BUSY -1
#define NEOPIXELPIN 40
@demogar
demogar / load-image.js
Last active April 27, 2022 17:03
video to ascii
let img;
function preload() {
img = loadImage("./dog.jpg");
}
function setup() {
createCanvas(800, 533);
}
function draw() {
@demogar
demogar / machine.js
Last active July 28, 2021 00:09
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@demogar
demogar / History\-1f77cd8e\entries.json
Last active April 24, 2023 12:27 — forked from angellindo/History|-108769b9|entries.json
Visual Studio code settings
{"version":1,"resource":"file:///c%3A/Users/demog/projects/homestead/Homestead.yaml","entries":[{"id":"8oI7.yaml","timestamp":1679686946723},{"id":"cX45.yaml","timestamp":1679686980075}]}
@demogar
demogar / corregimientos.csv
Created September 25, 2017 16:47
Organización Territorial de Panamá (Provincias, Distritos, Corregimientos)
id name district_id
1 Bocas del Toro (Cabecera) 1
2 Bastimentos 1
3 Cauchero 1
4 Punta Laurel 1
5 Tierra Oscura 1
6 Changuinola (Cabecera) 2
7 Almirante 2
8 Guabito 2
9 Teribe 2
@demogar
demogar / appcelerator.js
Last active March 22, 2017 10:07
ManejoAlHombro
function _openCamera() {
Titanium.Media.showCamera({
success : function(event) {
if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
_uploadReport(event.media);
} else {
alert("No es una imagen =" + event.mediaType);
}
},
error : function(error) {
#!/usr/bin/env ruby
require 'rubygems'
require 'levenshtein'
require 'csv'
# Config
counter = 0
maxError = 3
inFile = 'entrada.csv'
#!/bin/bash
# chkconfig: 2345 55 25
# Dashing service
# Add this file to /etc/init.d/
# Make executable
# Configure chkconfig
# Dashboard will start at boot. Check out the boot log for trouble shooting "/var/log/boot.log"
######################################################
#YOU WILL NEED TO CONFIGURE THIS FOR YOUR ENVIRONMENT#
######################################################