Skip to content

Instantly share code, notes, and snippets.

View ivan-hilckov's full-sized avatar
🤔

Ivan Hilkov ivan-hilckov

🤔
View GitHub Profile
class Elections.View.Test extends Elections.View.Base
el: ".js-test-popup"
initialize: ->
@sections =
index: this.$( ".js-st-step-0" )
test: this.$( ".js-st-step-1" )
result: this.$( ".js-st-step-2" )
<?php
$url = "https://api.vk.com/method/wall.post?owner_id={$user['vkid']}&message={$object['description']}.&uid={$user['vkid']}&access_token={$user['vktok']}&attachments={$object['link2site']}";
$spost = file_get_contents($url);
?>
class App < Sinatra::Base
register Sinatra::AssetPack
assets {
serve '/js', :from => 'app/js' # Optional
serve '/css', :from => 'app/css' # Optional
serve '/img', :from => 'app/img' # Optional
# The second parameter defines where the compressed version will be served.
require 'rubygems'
require 'sinatra'
require "#{File.dirname(__FILE__)}/db"
class App < Sinatra::Base
configure do
set :environment, :development
@ivan-hilckov
ivan-hilckov / gist:4055362
Created November 11, 2012 16:09
Sublime Text Font Smoothing
# Номрмальная ширина шрифта в сублиме - http://chrissilich.com/blog/sublime-text-font-smoothing-anti-aliasing-issues-in-mountain-lion/
defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
@ivan-hilckov
ivan-hilckov / Quadratic equation Java
Created November 13, 2012 10:30 — forked from glamkawaii/Quadratic equation Java
Quadratic equation in Java
package edu.workspace;
import java.util;
import java.io.InputStream;
class SquareEquation {
    public static void findSquareEquationRoots(String[] args) {
        print("Решим квадратное уравнение");
        if (args.length < 3) {
            println("Введите параметры уравнения(a, b, c) в командной строке");
# Модуль инициализирующий приложение
window[ "Elections" ] = Elections = window[ "Elections" ] or {}
class window[ "Elections" ][ "Loader" ]
constructor: ->
# расширяем будущее приложение событиями из Backbone
@app = _.extend {}, window[ "Backbone" ][ "Events" ]
# Список всех модулей для работы страницы авторизации
# [ [ {} ... {} ] [ {} ... {} ] [ {} ... {} ] ]
# Каждый масив модулей грузиться последовательно
# порядок загрузки пачки модуле опредиляется позициеей в массиве
#
# Модули внутри массива могут быть асинхроными и грузиться не последовательно
window[ "Elections" ] = Elections = window[ "Elections" ] or {}
window[ "Elections" ][ "page" ] = "auth"
page:
auth:
defult: [ "ban_authorization", "ban_registration" ]
allow_login: [ "signin", "signup", "restore", "openid", "lj", "ban_registration", "restore_mail", "confirm", "activation", "error" ]
allow_registration: [ "ban_authorization", "signup" ]
allow_openstat: [ "openstat" ]
set_password:
defult: [ "ban_authorization" ]
allow_login: [ "set_password" ]
allow_openstat: [ "openstat" ]