Skip to content

Instantly share code, notes, and snippets.

View smith3v's full-sized avatar

Slava Kuznetsov smith3v

View GitHub Profile
;;rrrrr;;;rSXSr;;ir;;;;rir;;;;;rrrrrrrir;;r;rrrrrrrrsr;r;rrrrrrrrrrrrrrrrrsr;sSrrrrrisrs;;SirrSsrr;ih5;;;2S:
r,::::::::5&hA2:,;::::,,;,,,::::;::XM;;:::::;:::::r9AA5:,rr:::::r:,:::;;;:r2s;r::;;;;;;r:,i;::i;::,rHr,,s3i,
r;rr;;;;;;9MA#Ar;:;;;;;s9S5i:;r;r;:2i;;rrrr;;;;;;rh@B##i;;rrr;;r5rr;;rrrr;i@Xrrrrrrrrrr5;;92rrrrs;:rh;:rHAA:
rrisssr;;:;s22r;;;r;;rABHhBAr:;r;;;,.:.,;sir:;;:,,rhAAXr;;sr;s9BBAMS;rrrr;;r;;rriis;;;ri:rM&;r;rs2;:;;:rA&X:
;:iXX3hXr::,::;;;;r;:rH&93&GA;;r;:::r: ;, ,,2r,... .;;;,:;5#A&AABi;;rrr;;;rrrrrsSSisr,s#&;;;;SGr:;;:iH&;:
rsX2222hr;;;:;rSrr;;i;5XA&3hr;;;. :, ;3is2 .:,., , ,;5AAA&GGr;rrr;;;rr;r;i33hh9;,i#2;;;rXX;:rr;;XS;:
i522225i;;;;;;;;rr;;;,.:irrr:;, .r35;:r;::52.,:,:rr,:,..;sr,;:;Xh25r:rr;r;;rrr;rX9X22XX;,iGr;;;i9S;;;:,,,,::
r:rrrr;:;;;riis;;;;;9S,...,:;rrr5GBMi;r.,:; ri:s2i2X5s.,Si. r:,,,,::;;;;;rrr;;;s55525sr:,ir;;r;;r;:i;:S,,;s:
r;;;:;;r;;;s5Siir;:;#@s;A2:sS222rrr:sM2rs,.,SS3Sr5Mrs5,,Si;,#3:ss:riSSir;rs;rS;;;;;;;:r::Xsirrr;::r2;;&irs2;
r:r;;;5#h;;;siiisrHH9#B##i;SSSis::, r2s:,,,
@smith3v
smith3v / gist:2042371
Created March 15, 2012 06:09 — forked from jallspaw/gist:2041431
Things that don't go away
- Metrics collection
- PaaS/IaaS evaluation/investigation
- Automation (auto-build, auto-recovery)
- Fault tolerance
- Availability
- Monitoring
- Performance
- Capex and Opex forecasting
- Outage response
def run_pg_fouine():
info = host_info[env.host_string]
db_name = info.tags.get('Name')
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
time.sleep(30)
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt')
run('gzip -f /tmp/pgfouine.txt')
@smith3v
smith3v / com.apple.fuse4x.plist
Created May 13, 2012 07:32
run fuse4x.kext on system start
<plist version="1.0"><dict><key>KeepAlive</key>
<false>
<key>Label</key>
<string>com.apple.fuse4x</string>
<key>ProgramArguments</key>
<array>
<string>//sbin/kextload</string>
<string>/System/Library/Extensions/fuse4x.kext</string>
</array>
<key>RunAtLoad</key>
@smith3v
smith3v / rename-node.rb
Created June 3, 2012 19:25 — forked from jtimberman/rename-node.rb
A knife exec script to change Chef node's name.
#!./bin/knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@smith3v
smith3v / server start
Created June 21, 2012 18:28
A bug in knife-ec2
$ knife ec2 server create --groups sg-4e63c727
ERROR: Fog::Compute::AWS::NotFound: The security group 'sg-4e63c727' does not exist
@smith3v
smith3v / sorting_dict_of_objects.py
Created August 13, 2012 04:02
Sorting a dict by property of the stored object
stats = Dict()
class Stats:
""" A class to keep some stats """
def __init__(self):
self.prop1 = 0
self.prop2 = 0
# Filling the dict with objects
@smith3v
smith3v / resouce-related issue with chef 11.4.4
Created June 22, 2013 12:11
Resource-related issue with Chef 11.4.4

Keybase proof

I hereby claim:

  • I am smith3v on github.
  • I am smith3v (https://keybase.io/smith3v) on keybase.
  • I have a public key ASBZRvQPDdicavDwykI5-A1emoRfFpDukxMrpqz-835fpAo

To claim this, I am signing this object:

@smith3v
smith3v / HangOps_ru-170427.md
Last active May 2, 2017 08:58
HangOps_ru 27.04.17 DevOps VS or and ITIL - чаты

Hangout

Дмитрий Малыхин 10:07 PM http://i.imgur.com/DFCuIfl.jpg

me 10:28 PM ITIL только у меня вызывает ощущение дикой бюрократии?

Дмитрий Малыхин 10:28 PM нет. а ДевОпс анархия ?