Skip to content

Instantly share code, notes, and snippets.

View olivermontes's full-sized avatar
🏁
ML

Oliver Montes olivermontes

🏁
ML
View GitHub Profile
- name: "greeting"
template: "Hola, ¿cómo estás?"
- name: "farewell"
template: "¡Adiós! Que tengas un buen día."
- name: "question"
template: "¿En qué puedo ayudarte hoy?"
You are an expert in SQL and Tinybird. Follow these instructions when working with .datasource and .pipe files:
<command_calling>
You have commands at your disposal to develop a tinybird project:
- tb build: to build the project locally and check it works.
- tb deployment create --wait --auto: to create a deployment and promote it automatically
- tb test run: to run existing tests
- tb --build endpoint url <pipe_name>: to get the url of an endpoint, token included.
- tb --build endpoint data <pipe_name>: to get the data of an endpoint. You can pass parameters to the endpoint like this: tb --build endpoint data <pipe_name> --param1 value1 --param2 value2
@olivermontes
olivermontes / index.pug
Created August 25, 2021 23:08
Random ember canvas 🔥😎
canvas
.menu
button
.icon
span
span
span
label
| Amount
input(type='range', min="1", max="500", step="1", value="100", id="AMOUNT")
@olivermontes
olivermontes / writeisomac.sh
Created October 7, 2020 07:04 — forked from oliver-montes/writeisomac.sh
Grabar imagen ISO en USB desde Mac OS
### Find Block Device
diskutil list
### Unmount USB Stick
diskutil unmountDisk /dev/diskX
### Write ISO to USB
@olivermontes
olivermontes / README.md
Created July 26, 2017 19:36
Install PHP7 on OS X El Capitan

Install PHP7 on OS X El Capitan

add the taps, unlink the old PHP if required and add php7

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56
brew install php70
@olivermontes
olivermontes / gist:bf333d468888c95c28ccfbe35abf2ee1
Created June 17, 2016 14:46
PHP Script to grab all images from a remote site.
<?
include ("htmlparser.inc");
$get_url = $_POST["url"];
$parser = HtmlParser_ForFile($get_url);
$image_urls = array();
while ($parser->parse()) {
if ($parser->iNodeType == NODE_TYPE_ELEMENT) {
@olivermontes
olivermontes / restart_bluetooth.sh
Created April 19, 2016 07:53 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@olivermontes
olivermontes / hello-world.py
Created April 17, 2016 00:54 — forked from alejandrofloresm/hello-world.py
Hello World for Google
# Code example for:
# Hello World - Machine Learning Recipes #1 - Google Developers
# https://www.youtube.com/watch?v=cKxRvEZd3Mw
from sklearn import tree
# Bumpy = 0, Smooth = 1
features = [[140, 1], [130, 1], [150, 0], [170, 0]]
# Apple = 0, Orange = 1
labels = [0, 0, 1, 1]
@olivermontes
olivermontes / gist:12a31c20c7fbd94ca988
Created October 22, 2015 16:42 — forked from molotovbliss/gist:3c7352f774873fb737c3
Using cURL via CLI to debug Magento's XML-RPC API calls
If any exceptions are encountered due to 3rd party/local observers debugging can be questionable as no log
is created to determine root cause. This mini doc covers how to use the XML-RPC API in Magento to test a
product update API call that is returning a 500 internal server error due to an observer firing in 3rd party
code. Using some simple XML docs prepared for login and the request it is easier to see the Fatal error
returned for a request, in this example product.update.
xmlrpclogin.xml contents:
<?xml version="1.0"?>
<methodCall>
@olivermontes
olivermontes / create_group_prices_magento.php
Last active August 29, 2015 14:27 — forked from herveguetin/create_group_prices_magento.php
Create/update group prices programmatically in Magento
<?php
class Namespace_Module_Model_Price_Import extends Mage_Core_Model_Abstract
{
/**
* DB Connection
*
* @var Varien_Db_Adapter_Interface
*/
protected $_conn;