I hereby claim:
- I am amr on github.
- I am amrmostafa (https://keybase.io/amrmostafa) on keybase.
- I have a public key whose fingerprint is 3466 023F 8389 9BB0 7FB8 41CA F000 083E F73A 3E24
To claim this, I am signing this object:
#!/bin/bash | |
# Print average apache process size | |
# Licensed under GPL v3 or later | |
# | |
# =| USAGE |=================================================================== | |
# | |
# echo <apache-parent-process-id> | ./apache_avg_procsize.sh | |
# | |
# On Debian this translates to: | |
# |
<?php | |
$regex = '#^\\{\\|(.*?)(?:^\\|\\+(.*?))?(^(?:((?R))|.)*?)^\\|}#msi'; | |
$source = "==GUIDE TO UNITED NATIONS HUMAN RIGHTS MACHINERY== | |
{| border=1 | |
|'''remit''' | |
|International | |
Covenant on Civil and Political Rights (ICCPR) | |
· periodic reports every 5 |
#!/bin/sh | |
# | |
# Shuffles given playlist outside mplayer instead of using -shuffle | |
# | |
# Usage: | |
# | |
# mplayer-shuffle-playlist <playlist-file> [mplayer-options] ... | |
# | |
PLAYLIST=$(mktemp mplayer-shuffle-playlist.XXXXX) |
#!/bin/bash | |
SLEEP=1 | |
THRESHOLD=500 | |
while [ 1 ] | |
do | |
threads=`mysqladmin stat | awk '{ print $4 }'` | |
echo "Active threads: $threads" | |
if [ $threads -gt $THRESHOLD ]; then | |
log="/root/mysql-monitor/logs/sqls-$threads-`date +%s`.log" |
<?php | |
/** | |
* @file | |
* Retrieves various load indicators from servers using SNMP. | |
* | |
* Licensed under GPL v3 or later. | |
* Copyright 2009 (c) Egypt Development Center. | |
*/ | |
/** |
#!/bin/bash | |
# | |
# Find all processes that are executing a futex(2) call with op=FUTEX_WAIT | |
# In some cases this can be helpful in finding deadlock-ed processes. | |
# | |
test ! $UID -eq 0 && echo -e "WARNING: Not running as root, only processes for this user are being scanned\n" >&2; | |
pids=$(ps -u $UID -opid --no-headers) | |
for pid in $pids; do |
#!/bin/bash | |
# | |
# Tells you the average size of your Apache processes | |
# It must run on a live apache server (unless you know what you are doing). | |
# It requires pmap, /proc, ps, grep, awk, sed and bc, | |
# | |
# Written by: Amr Mostafa" <[email protected]> | |
# | |
# Courtesy of Egypt Development Centre (c). |
#!/usr/bin/env python | |
def is_comment(line): | |
return line.startswith('<!--') | |
def is_empty(line): | |
return len(line) == 0 | |
if __name__ == '__main__': | |
f = open('/tmp/definitions.txt', 'r') |
/* | |
* This a modified version based on code by MoPub Inc. | |
* The author's modifications are released into the public domain. MoPub .inc code | |
* is originally released under the license below. | |
* | |
* Copyright (c) 2010-2013, MoPub Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are |
I hereby claim:
To claim this, I am signing this object: