Skip to content

Instantly share code, notes, and snippets.

View bazo's full-sized avatar

Martin Bazik bazo

View GitHub Profile
@bazo
bazo / cli
Created January 13, 2016 13:57
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Application;
// Let bootstrap create Dependency Injection container.
$configurator = require __DIR__ . '/app/bootstrap.php';
$configurator->addConfig(__DIR__ . '/app/config/console.neon');
@bazo
bazo / gist:f432711ea067840479dc
Created February 5, 2016 20:33 — forked from cucmberium/gist:3d7aca28753f7f45e172
Prism.Mvvm.MvvmAppBase for Universal App Platform
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.UI.ApplicationSettings;
using Windows.ApplicationModel;
@bazo
bazo / cortana.html
Created April 12, 2016 12:29 — forked from seksenov/cortana.html
Cortana integration from a hosted web app on Windows. To do this you'll need a meta tag in your html page pointint to an xml voice command definition file on your server. You'll also need to handle the Cortana activation event in your JavaScript.
<!DOCTYPE html>
<html>
<head>
<title>Cortana Example</title>
<!--Cortana meta tag pointing to VCD file on the server-->
<meta name="msapplication-cortanavcd" content="https://mysite.com/vcd.xml"/>
</head>
<body>
</body>
@bazo
bazo / redux-form-tut.js
Created August 23, 2016 11:58 — forked from dmeents/redux-form-tut.js
The source code for the redux form tutorial on davidmeents.com
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { connect } from 'react-redux';
import * as actions from '../../actions';
const form = reduxForm({
form: 'ReduxFormTutorial',
validate
});
@bazo
bazo / server.py
Created February 27, 2017 20:09 — forked from lalinsky/server.py
Example audio fingerprint server using Chromaprint
import chromaprint
from flask import Flask, request, jsonify
SQL_TABLES = """
CREATE TABLE IF NOT EXISTS fingerprint
(
id INTEGER PRIMARY KEY,
fingerprint TEXT NOT NULL
@bazo
bazo / convert.sql
Created April 7, 2017 13:15
convert mysql db to utf8mb4
delimiter //
DROP PROCEDURE IF EXISTS convert_database_to_utf8mb4 //
CREATE PROCEDURE convert_database_to_utf8mb4()
BEGIN
DECLARE table_name VARCHAR(255);
DECLARE done INT DEFAULT FALSE;
DECLARE cur CURSOR FOR