This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matches_set = CommonSet.new(@mysql, @mongo, job) | |
method = (eval "#{job.args['method']}Method").new(@mysql, @mongo, user, matches_set) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /var/log/php-fpm/php-slow.log | \ | |
grep -v "/lib/vendor\|/lib/.*Filter\|cache/frontend\|+++ dump failed\|pool www\|script_filename" | \ | |
cut -c 22- | grep "^$" -A 1 | grep "/" | \ | |
grep `ls /srv/www/prod/releases/ | tac | head -1` | \ | |
sort | uniq -c | sort -n | less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Было: | |
'<?xml version="1.0" encoding="UTF-8"?> | |
<response> | |
<status>0</status> | |
<iframeUrl>https://www.onlinedengi.ru/pay/bank_cards.php</iframeUrl> | |
<paymentId>117341518</paymentId> | |
<amountOriginal>553</amountOriginal> | |
<currency>RUB</currency> | |
<lang>rus</lang> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.getUnique = function(){ | |
var u = {}, a = []; | |
for(var i = 0, l = this.length; i < l; ++i){ | |
if(u.hasOwnProperty(this[i])) { | |
continue; | |
} | |
a.push(this[i]); | |
u[this[i]] = 1; | |
} | |
return a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getScript('http://cdn.jsdelivr.net/jquery.lazyload/1.8.4/jquery.lazyload.js', function() { | |
var $popup = $('<div></div>').css({ | |
position: 'fixed' | |
}); | |
$('body').append($popup); | |
$('a[href*="/rent/flat/"]').lazyload({ | |
threshold : 200, | |
appear: function(elements_left, settings) { | |
var $container = $(this).closest('div'); | |
$.get($(this).attr('href'), function (data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* | |
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt | |
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm | |
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm | |
rpm --import https://fedoraproject.org/static/0608B895.txt | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi | |
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.ci commit | |
git config --global alias.co checkout | |
git config --global alias.st status | |
git config --global alias.br branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ convert f4cf6efd198523859819d78c333b63d7.jpg -bordercolor white -border 1x1 -alpha set -channel RGBA -fuzz 1% -fill none -floodfill +0+0 white -shave 1x1 coin.png | |
$ convert coin.png \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage coin.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// class User.php | |
namespace Billing; | |
class User { | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -name "*.php" -exec php -l {} \; | grep -v "No syntax" |
OlderNewer