This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Twitter --> | |
<a href="http://twitter.com/share" class="twitter-share-button" data-lang="ru" data-url="http://simonenko.su">Tweet</a> | |
<!-- Facebook Like --> | |
<div class="fb-like" data-href="http://simonenko.su" data-layout="button_count" data-send="false" data-show-faces="true"></div> | |
<!-- Google +1 --> | |
<div class="g-plusone" data-href="http://simonenko.su"></div> | |
<!-- ВКонтакте "Мне нравится" --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "simonenko.su" | |
set :node_file, "server.coffee" | |
set :host, "178.79.189.200" | |
set :repository, "[email protected]:meritt/simonenko.su.git" | |
set :user, "root" | |
set :admin_runner, "www" | |
set :scm, :git | |
set :branch, "master" | |
set :deploy_via, :remote_cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "simonenko.su" | |
set :node_file, "server.coffee" | |
set :host, "178.79.189.200" | |
set :repository, "[email protected]:meritt/simonenko.su.git" | |
set :user, "root" | |
set :admin_runner, "www" | |
set :scm, :git | |
set :branch, "master" | |
set :deploy_via, :remote_cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tumblr = require('tumblr').Tumblr | |
blog = new Tumblr 'simonenko.tumblr.com', 'OAuth Consumer Key' | |
blog.text limit: 2, (error, response) -> | |
throw new Error error if error | |
console.log response.posts | |
blog.link limit: 10, tag: "javascript", (error, response) -> | |
throw new Error error if error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Asynchronous DSL for CoffeeScript | |
serial = (f) -> | |
next = -> arr.shift().apply(null, arguments) if arr.length | |
arr = (v for k, v of f(next)) | |
next() | |
null | |
parallel = (f, after = ->) -> | |
res = {}; arrc = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (navigator.geolocation) { | |
// #showroute это id кнопки/ссылки на сайте, нажимая которую мы должны проложить маршрут | |
var showroute = document.getElementById('showroute'); | |
showroute.addEventListener('click', function(event) { | |
event.preventDefaults(); | |
// пока строится маршрут не разрешаем нажимать на кнопку/ссылку снова | |
if (!showroute.classList.contains('disabled')) { | |
showroute.classList.add('disabled'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add this script to the end of your document that use <input autofocus type="text" /> | |
* or <input type="text" placeholder="username" /> and it'll plug support for browser | |
* without these attributes | |
* Minified version at the bottom | |
*/ | |
(function () { | |
function each(list, fn) { | |
var l = list.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Если localStorage доступен, используем его | |
if (('localStorage' in window) && window.localStorage !== null) { | |
localStorage.taglist = '["#html5","#css3","#simonenko"]'; | |
} else { | |
// если старый браузер, используем Cookie. | |
var date = new Date(); | |
date.setTime(date.getTime() + (365*24*60*60*1000)); | |
document.cookie = 'taglist=["#html5","#css3","#simonenko"]; expires=' + date.toGMTString() + '; path=/'; | |
} |