Skip to content

Instantly share code, notes, and snippets.

@benknight
benknight / gist:6575768
Last active December 23, 2015 03:49
Create a notepad in a browser tab bookmarklet.
Drag me to the bookmark bar:<br>
<a href="data:text/html, <body contenteditable style='font-family:Monaco,monospace;font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;'>">Notpad</a>
@benknight
benknight / gist:6591197
Last active December 23, 2015 05:59
New yelp.com loading spinner
.yelp-spinner {
opacity: 1;
background-color: rgba(255, 255, 255, 0.75);
}
.yelp-spinner .large-throbber-container {
background: url(http://f.cl.ly/items/1H1o3I3g3F3g343g190V/11_small.gif) no-repeat center;
background-color: white;
height: 92px;
width: 80px;
@benknight
benknight / gist:6619328
Last active December 23, 2015 10:09
Yelp CSS rewrites remove visual container, restyle header add ons bar
body {
background: white;
}
#super-container {
-webkit-box-shadow: none;
box-shadow: none;
border: none;
}
@benknight
benknight / gist:6987563
Last active December 25, 2015 13:59
Baz slideshow concept
(function() {
if ( ! $(document.body).is('.biz-details') ) {
return false;
}
var current_set = 0;
var num_sets;
var photos = [];
var photo_sets = [];
var timeout_id;
@benknight
benknight / SassMeister-input.scss
Last active December 27, 2015 01:09
An index bookmarklet for all my gists that are Yelp UI tweaks.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
#yelp-ui-demos {
z-index: 9999; // "I'M THE TOP-MOST THING I PROMISE!"
-webkit-font-smoothing: antialiased;
position: fixed;
bottom: 10px;
@benknight
benknight / gist:7389561
Last active December 27, 2015 21:09
Connect review borders to sidebar border
.ylist-bordered.reviews > li {
margin-right: -30px;
padding-right: 30px;
}
.feed-header:after {
margin-right: -15px;
border-color: #e5e5e1;
}
@benknight
benknight / gist:7391416
Last active December 27, 2015 21:19
Apply kerning pairs
/*
* http://aestheticallyloyal.com/public/optimize-legibility/
* http://adamdscott.com/kerning-for-the-web/
* http://ascott1.github.io/labs.adamdscott/kern/optimize.html
*/
body {
text-rendering: optimizeLegibility !important; /* Deprecated I'm pretty sure */
-webkit-font-feature-settings: "kern" 1; /* The new w3c hotness */
-moz-font-feature-settings: "kern" 1;
font-feature-settings: "kern" 1;
@benknight
benknight / gist:7654020
Created November 26, 2013 05:55
Improves scrolling perf on Airbnb search page
// Original Logic:
// ---------------
//
// this.initSidebarHeader=function(){
// this.$node.on(
// "scroll",(
// function(){
// var searchResultsPos=this.select("searchResultsSelector").offset();
// if(searchResultsPos.top<=100){
// this.$node.addClass("stuck");
@benknight
benknight / SmartyPants.pl
Created December 20, 2013 21:13
EducateQuotes from John Gruber's "smartypants"
sub EducateQuotes {
#
# Parameter: String.
#
# Returns: The string, with "educated" curly quote HTML entities.
#
# Example input: "Isn't this fun?"
# Example output: &#8220;Isn&#8217;t this fun?&#8221;
#
@benknight
benknight / gist:8375198
Last active January 2, 2016 23:19
Wider Yelp.com pages (jQuery only)
/* Baz */
.widen .biz-page-subheader .column-alpha {
width: 100%;
}
.widen .biz-page-subheader .column-beta {
width: 660px;
}
.widen .mapbox-map {