Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / php_mdb.rst
Created January 11, 2016 16:37 — forked from amirkdv/php_mdb.rst
How to handle MS Access MDB files in Linux with PHP5 PDO and ODBC

To be able to use PHP5 PDO with MS Access mdb files the following is required (the same applies for the PHP4 style of using odbc_X except for the obviously PDO specific requirements):

PHP ODBC module

In Linux this is achieved by intalling the php5-odbc package:

jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
<?php
// The only chance now, I felt was the possibility that we'd gone to such
// excess that nobody in the position to bring the hammer down on us could
// possibly believe it.
// Hunter S. Thompson
trait CompactClass {
private $data;
@bazo
bazo / gist:5427161
Last active December 16, 2015 11:28 — forked from anonymous/gist:5427135
<?php
//sid.php (indexy)
if(isset($SID["_MSG_ARRAY"])) foreach ( $SID["_MSG_ARRAY"] as $m ) $SID["MESSAGES"] .= $m;
if(isset($SID["_ERR_ARRAY"])) foreach ( $SID["_ERR_ARRAY"] as $m ) $SID["ERRORS"] .= $m;
if(isset($SID["_CON_ARRAY"])) foreach ( $SID["_CON_ARRAY"] as $m ) $SID["CONTENT"] .= $m;
//sid.php (variable)
//z kerej riti sa vzal $select_flag?