Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sergeyklay's full-sized avatar
🇺🇦

Serghei Iakovlev sergeyklay

🇺🇦
View GitHub Profile
@lappi-lynx
lappi-lynx / bootstrap_breadcrumbs_builder.rb
Last active August 29, 2015 13:56
bootstrap builder for breadcrumbs_on_rails gem
# bootstrap builder for breadcrumbs_on_rails gem
class BootstrapBreadcrumbsBuilder < BreadcrumbsOnRails::Breadcrumbs::Builder
def render
@context.content_tag(:ul, class: 'breadcrumb') do
@elements.collect do |element|
render_element(element)
end.join.html_safe
end
end

Go support for Vim

Go is an interesting language in many respects, and one of them is tooling. Unlike many other languages, Go attempts to ship with various tools for code parsing and rewriting, to make it feasible to use IDE-like functionality with any editor or IDE, simply by invoking tools on the command-line.

I'd like to demonstrate my own fork of the Go Vim support, talk about what Google has provided and what kind of experiments I've done with it. I'll also show some interesting Go tools and how they can be integrated into Vim, like code completion, finding definitions, the "Go Oracle".

Even if you don't know anything about Go, I hope it will turn into an interesting discussion about language support and tooling in general.

@sakama
sakama / MySQL5.6のFulltextIndexのベンチマーク結果.md
Created July 22, 2014 10:59
MySQL5.6のFulltextIndexのベンチマーク結果

MySQL5.5

text型

mysql> explain select * from restaurants where name like "あ%";
+----+-------------+-------------+------+---------------+------+---------+------+--------+-------------+
| id | select_type | table       | type | possible_keys | key  | key_len | ref  | rows   | Extra       |
+----+-------------+-------------+------+---------------+------+---------+------+--------+-------------+
use \Phalcon\DI\Exception as Exception,
\Phalcon\DI\FactoryDefault as DefaultInjector,
\Phalcon\DI\InjectionAwareInterface,
\Phalcon\Config\Adapter\Json as JsonConfig;
/**
* DependencyInjector class
* Override the default DI class, due to an inability to update shared services
*
* @extends DefaultInjector
Hey all!
So, We are active users who uses Phalcon/Zephir and we want to see good progress on this.
But due to some problems in the organization process of the community, and not enought time for contirube from main maintainers (@andres ....
Projects are developing quite sluggish and It's awfull.
We would like to create a public vote "Transfer Phalcon and Zephir to Zephir and Phalcon organtizations",
identifying major maintainers and principles "How to development this projects".
Basic things that we are motivated:
We couldn’t find that file to show.
@jamband
jamband / gist:1426465
Created December 3, 2011 07:47
Yii Framework: ImageUploadBehavior
<?php
/**
* ImageUploadBehavior class file.
*/
class ImageUploadBehavior extends CActiveRecordBehavior
{
/**
* @var string the file upload column name
*/
@kix
kix / deploy.rb
Created October 18, 2012 16:47
Yii Capistrano recipe
set :application, "AppName"
set :repository, "git@github.com:path/toRepo.git"
set :deploy_to, "/app/appname"
set :deploy_via, :copy
set :stage_dir, "config/stages"
set :current_dir , "www"
set :default_stage, "dev"
set :stages, %w(dev testing prod)
set :use_sudo, false
@sandeepone
sandeepone / PHP-5.3-install.sh
Last active December 16, 2015 08:48
Custom php 5.3 with fpm installation
#!/bin/sh
#####################################
# PHP Installer #
# Written For Centos 5.x #
#####################################
# Author: Sandeep Sangamreddi #
# URL: gleez.com #
# GitHub: github.com/sandeepone #
#####################################
@mikew
mikew / 00-README.md
Last active December 31, 2015 04:59
Gitlab -> Jenkins

Installation

  • Set JENKINS_USER and JENKINS_TOKEN environment variables

  • Edit mappings.json and add a push hook in Gitlab to http://localhost:5678/push.php

    OR

Simply add a push hook in gitlab to http://localhost:5678/push.php?project=Jenkins+Project&amp;token=ABCDEF