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
; Upstream | |
git branch | grep -v "master" | xargs git push origin --delete | |
; Local | |
git branch | grep -v "master" | xargs git branch -D |
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
# Purge old tags | |
tag_limit=8 | |
tag_current=`git tag -n |grep -i "jenkins-${JOB_NAME}" | wc -l` | |
if [ $tag_limit -lt $tag_current ]; then | |
tag_difference=`expr $tag_current - $tag_limit ` | |
git tag |grep -i "jenkins-${JOB_NAME}" | head -$tag_difference | xargs git push --delete origin | |
git tag |grep -i "jenkins-${JOB_NAME}" | head -$tag_difference | xargs git tag -d | |
fi | |
# Create tag |
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
#!/bin/bash | |
# | |
# Author: Aleksey Korzun | |
email='alert@domain.com' | |
default_max=60 | |
echo "==========================================================================" | |
echo " Replicator Man v1.0.2 " | |
echo "==========================================================================" |
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
#!/bin/bash | |
# | |
# Author: Aleksey Korzun | |
echo "==========================================================================" | |
echo " Magento Data Segmentator v1.0.1 " | |
echo "==========================================================================" | |
help() { | |
echo "Usage: -s schema [-f filename] [-e '(baublebar.com|aleksey.v.korzun@gmail.com)'] [-d 7] [-l 1000] [-r 1]" 1>&2; |
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
# Lighttpd | |
$HTTP["referer"] !~ "^($|http://([^/]*\.)?imagesocket\.(com|net|org)/)" { | |
magnet.attract-physical-path-to = ("/www/sites/conf/imagesocket/bandwidth.lua") | |
} | |
# Lua check for images that exceeded limit(S) | |
# Path - Flag - Expiration | |
local url_check = | |
{ | |
["/images/2012/08/20/1.png"] = true, -- 1352167206 |
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
#!/bin/bash | |
# | |
# Whitelist Pingdom probe-servers in iptables. | |
# | |
# Create a chain called "PINGDOM" and jump to it somewhere before | |
# the final REJECT/DROP, e.g. | |
# | |
# # New chain for Pingdom rules | |
# :PINGDOM - [0:0] | |
# |
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 ! -type d ! -name _tmp_ -exec sh -c 'expand -t 4 {} > _tmp_ && mv _tmp_ {}' \; |
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 | |
/** | |
* Proof of concept, segmentation fault (spl_array.c/igbinary.c) | |
* when using nested objects. | |
* | |
* PHP 5.3.6, PECL-Memcached 1.x, Igbinary 1.x | |
* | |
* @author Aleksey Korzun | |
*/ |
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"?> | |
<!DOCTYPE policymap [ | |
<!ELEMENT policymap (policy)+> | |
<!ELEMENT policy (#PCDATA)> | |
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED> | |
<!ATTLIST policy name CDATA #IMPLIED> | |
<!ATTLIST policy rights CDATA #IMPLIED> | |
<!ATTLIST policy pattern CDATA #IMPLIED> | |
<!ATTLIST policy value CDATA #IMPLIED> |
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
echo "Creating package structure..." | |
rm -rf package | |
# Purge old tags | |
echo "Tag: jenkins-${JOB_NAME}" | |
git fetch --tags | |
tag_limit=4 | |
tag_current=`git tag -n |grep -i "jenkins-${JOB_NAME}" | wc -l` |
OlderNewer