Skip to content

Instantly share code, notes, and snippets.

View lpetrov's full-sized avatar

Lyubomir Petrov lpetrov

View GitHub Profile
@lpetrov
lpetrov / firefox_border_radius_video_bug.html
Last active August 29, 2015 14:14
firefox_border_radius_video_bug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if lt IE 9]><html xmlns="http://www.w3.org/1999/xhtml" class="ie8"><![endif]-->
<!--[if IE 9]><html xmlns="http://www.w3.org/1999/xhtml" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html xmlns="http://www.w3.org/1999/xhtml" class="other"> <!--<![endif]-->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<style>
.container0 {
@lpetrov
lpetrov / testcase.js
Created January 10, 2014 12:40
Strophejs SCRAM-SHA-1 issue
var _connect = function(jid, password) {
var connection = new Strophe.Connection('http://localhost:5280/http-bind');
connection.connect(jid, password, function(status)
{
if (status == Strophe.Status.CONNECTING) {
console.log('Strophe is connecting.');
} else if (status == Strophe.Status.CONNFAIL) {
console.log('Strophe failed to connect.');
} else if (status == Strophe.Status.AUTHFAIL) {
@lpetrov
lpetrov / index.php
Created March 28, 2012 15:00
og:locale og:locale:alternate
<?php
$cacheBuster = "t26";
$possibleLangValues = array(
@$_REQUEST[ 'lang' ],
@$_SERVER[ 'HTTP_X_FACEBOOK_LOCALE' ],
@$_REQUEST[ 'fb_locale' ],
@$_REQUEST[ 'fb_ref' ],
@$_REQUEST[ 'locale' ],
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best