Skip to content

Instantly share code, notes, and snippets.

View fastventure's full-sized avatar
💭
Always be shipping

Vlad Khomutov fastventure

💭
Always be shipping
View GitHub Profile
@fastventure
fastventure / mejs_playbackrate_plugin
Created November 2, 2017 18:51 — forked from rocky-jaiswal/mejs_playbackrate_plugin
Media Element JS plugin to modify video playback speed.
//Copy this plugin and add 'fasterslower' to the features array. Also write the CSS :)
(function($) {
$.extend(mejs.MepDefaults, {
fasterslowerText: 'Faster/Slower'
});
$.extend(MediaElementPlayer.prototype, {
buildfasterslower: function(player, controls, layers, media) {
@fastventure
fastventure / mysql2sqlite.sh
Created February 14, 2017 04:28 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@fastventure
fastventure / business-models.md
Created February 13, 2017 15:20 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@fastventure
fastventure / README.md
Created January 9, 2017 12:47 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@fastventure
fastventure / gist:7da1cefee9b73f0937a9d5e7373179cf
Created May 26, 2016 03:59 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

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