Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Cristian Miranda cristianmiranda

🏡
Working from home
View GitHub Profile
View aspiradora.js
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"]);
View 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.
View menu.json
[{"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}]
View menu.js
// SIMULAR: PRECIO MENÚ
// ENTRADA: Nº DE MENÚ
class Menu {
constructor(nuevoMenu,nuevoPrecio){
this.menu = nuevoMenu;
this.precio = nuevoPrecio;
}
}
View speedtest.py
#!/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
View speedtest.py
#!/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
@cristianmiranda
cristianmiranda / bootstrap.sh
Last active Aug 22, 2020
cmiranda's dotfiles bootstrap script
View bootstrap.sh
# 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
View oracle-db.error.log
[oracle@a6573e40d8b8 dbfiles]$ cat /home/oracle/setup/log/configDB.log
Sat Apr 25 00:35:35 UTC 2020
Start Docker DB configuration
Call configDBora.sh to configure database
Sat Apr 25 00:35:35 UTC 2020
Configure DB as oracle user
Setup Database directories ...
SQL*Plus: Release 12.2.0.1.0 Production on Sat Apr 25 00:35:35 2020
View brcmfmac43602-pcie.txt
boardrev=0x1101
sromrev=11
boardtype=0x073e
vendid=0x14e4
devid=0x43ba
macaddr=00:90:4c:0d:f4:3e
ccode=0
View refind.conf
#
# refind.conf
# Configuration file for the rEFInd boot menu
#
# Timeout in seconds for the main menu screen. Setting the timeout to 0
# disables automatic booting (i.e., no timeout). Setting it to -1 causes
# an immediate boot to the default OS *UNLESS* a keypress is in the buffer
# when rEFInd launches, in which case that keypress is interpreted as a
# shortcut key. If no matching shortcut is found, rEFInd displays its