Skip to content

Instantly share code, notes, and snippets.

@pavelbinar
pavelbinar / extract-subtitles-from-mkv.md
Last active November 30, 2024 14:48 — forked from bmaeser/subtitle-extract.txt
Extract subtitles from .mkv files on Mac OS X
@pavelbinar
pavelbinar / index.html
Created October 13, 2015 12:04 — forked from anonymous/index.html
Two Columns With Different Items Alignment // source http://jsbin.com/vasilopeca
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Two Columns With Different Items Alignment</title>
<style id="jsbin-css">
.column {
position: absolute;
width: 200px;
height: 300px;
@pavelbinar
pavelbinar / osx-for-hackers.sh
Last active August 29, 2015 14:25 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@pavelbinar
pavelbinar / gist:01521316c4f528eac2b0
Last active August 29, 2015 14:25 — forked from tomraithel/gist:3852171
SASS: mixin for absolute center position
@mixin center($width, $height) {
position: absolute;
left: 50%;
top: 50%;
height: $height;
width: $width;
margin-left: - $width / 2;
margin-top: - $height / 2;
}
@pavelbinar
pavelbinar / README.md
Last active August 29, 2015 14:25 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@pavelbinar
pavelbinar / topkeywords.js
Last active August 29, 2015 14:25 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@pavelbinar
pavelbinar / mDNSResponder.sh
Created March 15, 2014 17:58 — forked from mipmip/gist:1844353
mDNSResponder
# Load up Terminal (Applications > Utilities > Terminal.app) and type the following.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
# To turn it back on, just do the opposite:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist