Skip to content

Instantly share code, notes, and snippets.

View bkd27's full-sized avatar

Bharat Dhaker bkd27

View GitHub Profile
var i,c,y,v,s,n;v=document.getElementsByClassName("youtube");if(v.length>0){s=document.createElement("style");s.type="text/css";s.innerHTML='.youtube{background-color:#000;max-width:100%;overflow:hidden;position:relative;cursor:hand;cursor:pointer}.youtube .thumb{bottom:0;display:block;left:0;margin:auto;max-width:100%;position:absolute;right:0;top:0;width:100%;height:auto}.youtube .play{filter:alpha(opacity=80);opacity:.8;height:77px;left:50%;margin-left:-38px;margin-top:-38px;position:absolute;top:50%;width:77px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNCAYAAADjCemwAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABgtJREFUeNrtXE1IJEcUFuYgHhZZAzOQwKLsaeY4MuCisLNkMUYM+TtmQwgYQSEg8RCIBAMBSYIQPCgEEiEYISZIgrhzCRLYg+BBMiiDGCHGH4xGETH4O85M+huql7Knuqe7urq7ercePAZnuqtefXZVvfe911VToyRUUqdpVNMmTROaJjVt0bRN0/uapslnG/k+Sa5rIvfVPQ8gRTSNaRrX9B4Bxa3eI+3FSPvPjLxAnpAbA+7s7HxrcnLyk8XFxe82NjZ+Ozw8XDk9Pd29urr6r1Ao5EulUhGf+Bvf43dch+txH+5ngJgg/YVWXtI0RQ9qbGzso1wu99PJyclfJQGCdtAe2jWAlyL9h0ZeJGtQeQC9vb2Pst
// You create your bookmarklet by instantiating
// a new Bookmarklet function, then pass in the options like so.
// This example checks to see if the var is already defined, and makes
// sure not to overwrite it. This could happen if the user clicks on
// the bookmarklet more than once.
var MyBookmarklet = MyBookmarklet || new Bookmarklet({
// debug: true, // use debug to bust the cache on your resources
css: ['/my/style.css'],
js: [],
/*
Copyright 2013 Martin Hawksey
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
/*
*
* Copyright 2012 - Luca Giacomel (lgiacomel [at] google [dot] com)
* Use this at your own risk!
* Remember that Google has nothing to do with this
* Distributed under GPLv3
*
*/
function doGet(e) {
<header>
<div class="wrap">
<h1 class="site-heading">Bookmarklets</h1>
<p class="description">Collecting useful bookmarklets accross the web. Curated by <a href="http://twitter.com/RadLikeWhoa_" target="_blank">Sacha Schmid</a>.</p>
<p class="links"><a href="#howto">Read the instructions</a><span class="separator">|</span><a href="http://twitter.com?status=@RadLikeWhoa_ I'd like to suggest a new bookmarklet: " target="_blank">Suggest a bookmarklet</a></p>
</div>
</header>
<section id="toolbar" class="toolbar" style="display: block;">
<div class="column">
<input id="search" class="search" type="search" placeholder="Search by name or by category">
// Do whatever you'd like with the script! Show it off, mod it up, post it places, or whatever. :)
// (If you do, I wouldn't mind a Twitter shoutout at @_slinehan when appropriate!)
$imageURL = "URL HERE";
$image = imagecreatefromjpeg($imageURL);
$width = imagesx($image);
$height = imagesy($image);
// First, let's resize the image to something manageable while maintaining aspect ratio.
@bkd27
bkd27 / functions.php
Created July 29, 2014 00:56 — forked from tlongren/functions.php
Function for wordpress schema.org
<?php
function html_tag_schema() {
$schema = 'http://schema.org/';
// Is single post
if(is_single()) {
$type = "Article";
}
// Is author page
@bkd27
bkd27 / facebook.png
Created February 21, 2020 09:08
Signature-icons
l