Skip to content

Instantly share code, notes, and snippets.

Alexander Kravets alexkravets

Block or report user

Report or block alexkravets

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View BlockstackAccountVerification
Verifying my Blockstack ID is secured with the address 1EL4G6M6y6orcFParQR677B9isUXV9k2Mx https://explorer.blockstack.org/address/1EL4G6M6y6orcFParQR677B9isUXV9k2Mx
@alexkravets
alexkravets / dock_on_the_right.txt
Last active Dec 21, 2015
Specification for the Dock on the right feature for Elementary OS.
View dock_on_the_right.txt
Idea behind this change is pretty simple. By default in Mac OS and Elementary the application doc is placed on the bottom of the screen. To me it looks like not optimal position and maybe obsolete. Reason for that is most of now-a-days screens are wide. Most used application is web browser. Dock on the bottom makes browser window big in width but small in height and that looks a disproportional.
<max visible website height> = <screen height> -
<top panel height> -
<window title height> -
<tab bar height> -
<address bar height> -
<dock height>
<max visible website width> = <max screen width>
@alexkravets
alexkravets / mkmf.log
Created Jul 12, 2013
log from nokogiri 1.6.0 installation
View mkmf.log
package configuration for libxslt is not found
package configuration for libxml-2.0 is not found
package configuration for libiconv is not found
find_header: checking for libxml/parser.h... -------------------- yes
"gcc-4.2 -o conftest -I/Users/akravets/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/Users/akravets/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/Users/akravets/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0 -I. -I/Users/akravets/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/i686-apple-darwin11/libxml2/2.8.0/include/libxml2 -I/Users/akravets/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/i686-apple-darwin11/libxml2/2.8.0/include -I/Users/akravets/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/i686-apple-darwin11/libxslt/1.1.26/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/akravets/.rvm/usr/include -I/Users/akravets/.rvm/usr/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter
@alexkravets
alexkravets / server.js
Created Jun 1, 2013
Localhost web server in a few lines using Node.js and Connect.
View server.js
var connect = require("connect");
var app = connect()
.use(connect.logger('dev'))
.use(connect.static('www'))
.listen(3000);
@alexkravets
alexkravets / video.coffee
Created May 22, 2013
Showdown extension for Youtube videos
View video.coffee
#
# Youtube iFrame Extension
#
window.Showdown.extensions.video = (converter) ->
[
{
type : 'lang',
regex : '\\^\\^([\\S]+)',
replace : (match, url) ->
youtube = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/
@alexkravets
alexkravets / x-youtube.scss
Created Apr 18, 2013
SCSS for the Sencha Youtube component (https://gist.github.com/alexkravets/5416594) to support play overlay and some styling.
View x-youtube.scss
.x-youtube {
&:after { content: '';
display: block;
position: absolute;
width:100%;
height:100%;
background: url('../images/youtube-play@2x.png') no-repeat center;
background-size: 58px 58px;
}
@alexkravets
alexkravets / Youtube.js
Last active Dec 16, 2015
This is a Sencha Touch component to support Youtube videos and have no issues with scrolling. It also supports youtube thumbs if `thumb` config paramer is missing.
View Youtube.js
// This is a Sencha Touch component to support Youtube videos
// and have no issues with scrolling. It also supports youtube
// thumbs if `thumb` config paramer is missing.
/* Include this in index.html to load YT Api library:
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
@alexkravets
alexkravets / blog_filters.rb
Created Jan 2, 2012
Custom Tags & Filters for LocomotiveCMS
View blog_filters.rb
module Locomotive
module Liquid
module Filters
# Module with custom filters
module Blog
# Creates a list of tags from a tags string, tags separated by comma
def tags(tags_string)
tags_string.split(', ').collect{|t| '<li><a href="/blog/tags/'+t+'" title="'+t.capitalize+'">'+t+'</a></li>'}.join()
You can’t perform that action at this time.