Skip to content

Instantly share code, notes, and snippets.

View rtuin's full-sized avatar
😃
Hi!

Richard Tuin rtuin

😃
Hi!
View GitHub Profile
<div class=”article”>
<div class=”header”>Very interesting article</div>
<div class=”introduction”>
This is a very interesting article. However, the content is all wrapped in div tags!
</div>
<div class=”content”>
Now this can be a very interesting story to read, but a computer can’t value it’s content against other random texts on this page.
</div>
</div>
@rtuin
rtuin / HTML5 Skeleton template.html
Created March 25, 2011 22:06
HTML5 skeleton template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
export QUERY_STRING="start_debug=1&debug_stop=1&debug_fastfile=1&debug_coverage=1&use_remote=1&send_sess_end=1&debug_session_id=2000&debug_start_session=1&debug_port=10137&debug_host=192.168.0.254"
@rtuin
rtuin / .bashrc
Last active December 11, 2015 14:38
function mybugon() {
export QUERY_STRING="start_debug=1&debug_stop=1&debug_fastfile=1&debug_coverage=1&use_remote=1&send_sess_end=1&debug_session_id=2000&debug_start_session=1&debug_port=10137&debug_host=192.168.56.1"
export PHP_IDE_CONFIG="serverName=$1"
}
alias bugon="mybugon"
alias bugoff="unset QUERY_STRING"
@rtuin
rtuin / gist:5028719
Last active April 11, 2024 14:57
400 Bad Request
To the tune of Lady Gaga - Bad Romance
http://www.youtube.com/watch?v=qrO4YZeyl0I
Oh, caught in a bad request
Oh, caught in a bad request
Rah, rah, oh, oh, oh
Roma, roma, ma
Gaga, ooh, la, la
Received a bad request
<?php
class Bundles implements ResponseClassInterface
{
protected $bundles = array();
public function addBundle($bundle)
{
$this->bundles[] = $bundle;
}
before "deploy:finalize_update", "deploy:minify_javascript"
namespace :deploy do
task :minify_javascript do
run_locally "cd #{copy_cache} && java -jar yuicompressor-2.4.7.jar -o public/js/script.min.js public/js/script.unpacked.js"
top.upload(File.join("#{copy_cache}", "/public/js/script.min.js"), "#{release_path}/public/js/script.min.js")
end
end
${WORKSPACE}/bin/behat --format junit --out ${WORKSPACE}/build
build/*.xml

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English