Alex Buznik beshur

View gist:9951830
1 2 3 4 5 6 7 8 9
<?php
App::error(function(Exception $exception, $code)
{
Log::error($exception);
 
 
// Save data to the database
$getUser = '';
// ....
View al.php
1 2 3 4 5 6 7 8 9 10
<?php
class Profile extends CActiveRecord
{
public function attributeLabels()
{
return array(
'id' => Yii::t('model', 118),
'from' => Yii::t('model', 119),
'email' => Yii::t('model', 120),
'user_id' => Yii::t('model', 121),
View resize.js
1 2 3 4 5 6 7 8 9
// fix jqueryui resizable bug:
//
// jqueryui resizable on 'resize' event invokes
// window.resize event, which maybe unwanted behaviour sometimes
//
window.onresize = function(event) {
if (typeof event.target.getAttribute === 'function')
return;
};
View helper.js
1 2 3 4 5
Handlebars.registerHelper("_i18n", function (string, content) {
if (!string) return;
var t = __(string, {message: content});
return t;
});
View inputNumberize.js
1 2 3 4 5 6 7 8 9 10
// simple jQuery input[type='number'] imitator
// with callback on number change
//
// supposed markup:
// <div class="elemnt">
// <input type="text" class="target" />
// <span class="arr more"></span>
// <span class="arr less"></span>
// </div>
$.fn.inputNumberize = function(options) {
View countdownize.js
1 2 3 4 5 6 7 8 9 10
// jQuery Simple minutes countdown timer
// https://gist.github.com/beshur/7872704
// @beshur
$.fn.countdownize = function() {
if (typeof window.page_var == "undefined") window.page_var = {};
this.each(function(i) {
var obj = $(this);
 
 
// assumes integer seconds are here
View gist:7706062
1 2 3 4 5 6 7 8 9 10
// jQuery function to center the image and stretch it to completely fill
// the parent, stretchin either height or width, when needed
//
// originally written by Ivan Ryzhenko
// https://gist.github.com/beshur/7706062
function blockPosition(obj, relative){
obj.each(function(index, element) {
$(this).css({'width': '', 'height': ''});
// var w = $(this).width();
// var h = $(this).height();
View scroll.js
1 2 3 4 5 6 7 8 9 10
window.page_var = {};
window.onload = function() {
$(".b_screens__el").each(function (i) {
page_var.screens[i] = $(this).offset().top;
})
}
$(window).resize(function() {
$(".b_screens__el").each(function (i) {
page_var.screens[i] = $(this).offset().top;
})
View index.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
 
<title>index</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="text/css" rel="stylesheet" href="fonts/fonts.css" />
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css" />
View meteor-windows-vagrant-tutorial.md

Tutorial: Meteor in Windows using Vagrant

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on steps 8 to 15.

If you have no idea what I’m talking about, I’ve made a tutorial to install Ubuntu Precise x86 through Windows command-line with Meteor very simple to follow

Something went wrong with that request. Please try again.