Skip to content

Instantly share code, notes, and snippets.

View juev's full-sized avatar
🏠
Working from home

Evsyukov Denis juev

🏠
Working from home
View GitHub Profile
// Mixins ---------------------------------------------------------------
=placeholder
&::-webkit-input-placeholder
@children
&:-moz-placeholder
@children
&.placeholder
@children
@juev
juev / chat.index.html
Created June 26, 2011 10:59 — forked from matthewfl/chat.index.html
A really basic chat server on http://chat.jsapp.us
<html>
<head>
<title>Chat</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
$(function () {
function check () {
$("#output").load('/update', function () {
setTimeout(check, 1);
});
@juev
juev / node-and-npm-in-30-seconds.sh
Created June 26, 2011 12:03 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@juev
juev / related_articles_help.rb
Created June 29, 2011 11:33 — forked from owengriffin/related_articles_help.rb
Nanoc helper to list articles related to the current item
module PaginationHelper
# The main pagination method, you should only need to call this
# Returns full HTML markup for pagination links
def pagination(page, pages, uri)
html, ul = [], []
html << pagination_position(page, pages)
if pages > 1
ul << pagination_previous_link(page, uri)
ul << pagination_page_links(page, pages, uri)
@juev
juev / tag_cloud_tag.rb
Created July 9, 2011 13:53 — forked from ilkka/tag_cloud_tag.rb
Jekyll tag cloud / tag pages plugin
module Jekyll
class TagCloudTag < Liquid::Tag
safe = true
def initialize(tag_name, text, tokens)
super
end
def render(context)
html = ""
@juev
juev / coffeescript_converter.rb
Created July 28, 2011 05:28 — forked from phaer/coffeescript_converter.rb
A trivial CoffeeScript.org -> Javascript plugin for jekyll ( https://github.com/mojombo/jekyll ). Put this file in '_plugins/' and write a YAML header to your .coffee files (i.e. "---\n---\n")
module Jekyll
require 'coffee-script'
class CoffeeScriptConverter < Converter
safe true
priority :normal
def matches(ext)
ext =~ /coffee/i
end
@juev
juev / html_reset.css
Created August 27, 2011 17:49 — forked from nathansmith/html_reset.css
Reset for HTML4 / HTML5
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,
@juev
juev / css.vim
Created September 3, 2011 17:30 — forked from tpope/css.vim
Nikolai's fix to nested closing curly brace indenting
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-12-22
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
@juev
juev / .inputrc
Created September 8, 2011 16:55 — forked from tpope/.inputrc
Basic amenities for vi readline bindings
set keymap vi-insert
Control-a: beginning-of-line
Control-b: backward-char
Control-d: delete-char
Control-e: end-of-line
Control-f: forward-char
Control-k: kill-line
Control-n: next-history
Control-p: previous-history
set keymap emacs-ctlx