Skip to content

Instantly share code, notes, and snippets.

View meritt's full-sized avatar
🎯
Focusing

Alexey Simonenko meritt

🎯
Focusing
View GitHub Profile
@meritt
meritt / wstdays.md
Last active August 29, 2015 14:03
Презентации с Web Standards Days. Санкт-Петербург, 28 июня.
@meritt
meritt / 1.css
Last active August 29, 2015 14:06
Борьба с пробелами между блочно-строчными элементами
nav a {
display: inline-block;
padding: 5px;
background: red;
}
@meritt
meritt / 1.css
Last active August 29, 2015 14:11
.error-default {
color: #f00;
border: 2px solid #fc0;
}
.error-special {
color: #f00;
border: 2px solid #fc0;
background-color: #fcc;
}
p:not(.intro) {
font-weight: bold;
}
function(kendo, _, $, Cloner) {
'use strict';
/**
* The component to make grid be able to edit inline
* @module gridinlineedit
*/
/**
* @class GridInlineEdit
@meritt
meritt / httpdump
Created April 4, 2009 07:52 — forked from peterc/httpdump
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
# OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile:
# (again replace "en1" with correct network interface name)
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*""
# All the above tested only on OS X.
var DateHelper = {
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
// Ruby strftime: %b %d, %Y %H:%M:%S GMT
time_ago_in_words_with_parsing: function(from) {
var date = new Date;
date.setTime(Date.parse(from));
return this.time_ago_in_words(date);
},
time_ago_in_words: function(from) {
# Ubuntu Server Upgrade
apt-get update
apt-get install update-manager-core
do-release-upgrade -d
# Ubuntu Dist Update
apt-get update
apt-get dist-upgrade
@meritt
meritt / snapper.rb
Created December 2, 2009 13:46
Получение скриншота сайта с помощью MacRuby
macruby -r snapper.rb -e "Snapper.new.save('http://serenity.su', 'serenity.su.png')"
@meritt
meritt / cache.php
Created December 22, 2009 16:04
Пример использования Zend_Cache_Manager
<?php
$manager = new Zend_Cache_Manager;
$dbCache = array(
'frontend' => array(
'name' => 'Core',
'options' => array(
'lifetime' => 7200,
'automatic_serialization' => true