Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alexey Simonenko meritt

🎯
Focusing
View GitHub Profile
@meritt
meritt / wstdays.md
Last active Aug 29, 2015
Презентации с Web Standards Days. Санкт-Петербург, 28 июня.
View wstdays.md
@meritt
meritt / 1.css
Last active Aug 29, 2015
Борьба с пробелами между блочно-строчными элементами
View 1.css
nav a {
display: inline-block;
padding: 5px;
background: red;
}
View 1.css
.error-default {
color: #f00;
border: 2px solid #fc0;
}
.error-special {
color: #f00;
border: 2px solid #fc0;
background-color: #fcc;
}
View 1.css
p:not(.intro) {
font-weight: bold;
}
View example.js
function(kendo, _, $, Cloner) {
'use strict';
/**
* The component to make grid be able to edit inline
* @module gridinlineedit
*/
/**
* @class GridInlineEdit
View 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.
View gist:107601
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) {
View Обновление Ubuntu
# 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 Dec 2, 2009
Получение скриншота сайта с помощью MacRuby
View snapper.rb
macruby -r snapper.rb -e "Snapper.new.save('http://serenity.su', 'serenity.su.png')"
@meritt
meritt / cache.php
Created Dec 22, 2009
Пример использования Zend_Cache_Manager
View cache.php
<?php
$manager = new Zend_Cache_Manager;
$dbCache = array(
'frontend' => array(
'name' => 'Core',
'options' => array(
'lifetime' => 7200,
'automatic_serialization' => true