Skip to content

Instantly share code, notes, and snippets.

View cristianmiranda's full-sized avatar
🏡
Working from home

Cristian Miranda cristianmiranda

🏡
Working from home
View GitHub Profile
@cristianmiranda
cristianmiranda / brcmfmac43602-pcie.txt
Created April 23, 2020 19:03
brcmfmac43602-pcie.txt
boardrev=0x1101
sromrev=11
boardtype=0x073e
vendid=0x14e4
devid=0x43ba
macaddr=00:90:4c:0d:f4:3e
ccode=0
@cristianmiranda
cristianmiranda / README.md
Created August 14, 2023 04:17 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@cristianmiranda
cristianmiranda / dolar.sh
Last active April 27, 2023 13:24
dolar.sh
#!/usr/bin/env bash
# Function to output usage instructions
function usage {
echo "Usage: $(basename $0) <options>" >&2
echo
echo "Gets the current USD value" >&2
echo
echo "OPTIONS:" >&2
echo " --blue | -b : Dólar Blue" >&2
const { NerManager } = require("node-nlp");
const manager = new NerManager({ threshold: 0.7 });
manager.addNamedEntityText("brand", "bosch", ["es"], ["bosch", "Robert Bosch"]);
manager.addNamedEntityText("brand", "hoover", ["es"], ["hoover"]);
manager.addNamedEntityText("brand", "philips", ["es"], ["philips"]);
manager.addNamedEntityText("color", "negro", ["es"], ["Negro", "negrito"]);
manager.addNamedEntityText("color", "naranja", ["es"], ["naranja"]);
@cristianmiranda
cristianmiranda / CustomDataViewColumn.java
Created January 22, 2021 23:32
CustomDataViewColumn.java
package com.escribehost.client.admin.application.sandbox.widgets;
import com.google.gwt.core.client.JavaScriptObject;
import com.googlecode.gwt.charts.client.ColumnFunction;
import com.googlecode.gwt.charts.client.ColumnType;
import com.googlecode.gwt.charts.client.Properties;
import com.googlecode.gwt.charts.client.RoleType;
/**
* Represents a calculated column. A calculated column creates a value on the fly for each row and adds it to the view.
[{"nombre":"CEVICHE","precio":350},{"nombre":"PAPAS AL ALIOLI","precio":200},{"nombre":"LANGOSTINOS","precio":250},{"nombre":"PAELLA","precio":400},{"nombre":"RABAS","precio":400},{"nombre":"SUSHI","precio":350},{"nombre":"SANDWICH POBOY","precio":380},{"nombre":"FISH DOG","precio":300},{"nombre":"FISH BURGER","precio":350}]
@cristianmiranda
cristianmiranda / menu.js
Created September 28, 2020 13:25
menu.js
// SIMULAR: PRECIO MENÚ
// ENTRADA: Nº DE MENÚ
class Menu {
constructor(nuevoMenu,nuevoPrecio){
this.menu = nuevoMenu;
this.precio = nuevoPrecio;
}
}
@cristianmiranda
cristianmiranda / bootstrap.sh
Last active August 22, 2020 15:37
cmiranda's dotfiles bootstrap script
# Just in case
sudo apt-get install -y git
# Grabs ssh & gpg keys
cd $HOME
BACKUP_DIR=/data/ssd/backups/manual/secrets
scp -r -P 62022 cmiranda@crismiranda.net:"${BACKUP_DIR}/.gnupg ${BACKUP_DIR}/.ssh ${BACKUP_DIR}/.cert" .
# Clones repo
WORKSPACE=$HOME/Documents/Work/Workspace
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0