Skip to content

Instantly share code, notes, and snippets.

View lachezar's full-sized avatar
:shipit:
Type safety lobbyist

Lachezar Yankov lachezar

:shipit:
Type safety lobbyist
View GitHub Profile
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.1
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http://*
// ==/UserScript==
@lachezar
lachezar / index.html
Created June 13, 2011 19:01
Mandelbrot + Web Workers
<!DOCTYPE html>
<html>
<head>
<title>Mandelbrot + Web Workers!</title>
</head>
<body>
<canvas id="canvas" width="800" height="600" style="float: left">There should be a canvas here?!</canvas>
<script type="text/javascript">
@lachezar
lachezar / Devices.java
Last active September 14, 2015 15:17
Helper class to get the consumer friendly device name. Upvote http://stackoverflow.com/a/27836910/1048340
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lachezar
lachezar / MultiDrawClient.html
Created March 22, 2010 11:16
Web Sockets based application for realtime drawing
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MultiDraw - Offline</title>
<meta charset="UTF-8">
<script type="text/javascript">
window.onload = function() {
try {
var s = new WebSocket("ws://" + document.location.host + ":6789/");
s.onopen = function(e) { document.title = 'MultiDraw - Online'; }
@lachezar
lachezar / x.js
Created September 24, 2009 19:55
An Ubiquity command to post the current browser's view in ScreenShootMe (http://dailyffs.com/shotme/)
CmdUtils.CreateCommand({
names: ["shotit"],
arguments: [{role: "object", nountype: noun_arb_text, label: "image format"}],
description: _("Publishes the current browser snapshot on the web and puts a link to it in the clipboard."),
homepage: "http://dailyffs.com/index.php/share-screen/",
author: {name: "Lucho Yankov"},
license: "GPL",
preview: _("Publishes the current browser snapshot on the web and puts a link to it in the clipboard."),
help: _("To specify the image format just put 'jpeg' or 'png' as command's parameter, if no format is specified and the image is smaller than 1200KB it will be saved as PNG, otherwise the JPEG format will be used."),
@lachezar
lachezar / bookmarklet
Last active August 29, 2015 14:16
Sans Bullshit Sans bookmarklet
javascript:(function(fontUrl,font,style){if(location.protocol==='https:'){fontUrl='https://lucho-yankov.github.io/assets/fonts/SansBullshitSans.ttf'}else{fontUrl='http://dailyffs.com/sansbullshitsans/SansBullshitSans.ttf';}font='@font-face{font-family:SansBullshitSans;src:url('+fontUrl+');font-weight:normal}';style=document.createElement('style');style.innerHTML=font+'*{font-family:SansBullshitSans;font-feature-settings:\'liga\',\'dlig\';font-variant-ligatures:common-ligatures;}';document.head.appendChild(style);}());