Skip to content

Instantly share code, notes, and snippets.

@AhmedKammorah
AhmedKammorah / new_gist_file
Created July 15, 2013 16:45
take screen shot
_
@AhmedKammorah
AhmedKammorah / ant datastore
Created July 24, 2013 13:49
Ant build for Data store
ant clean build -Denv.name=development -Dapi.type=internal
cp internal-datastore.war /Users/ahmedkammorah/apache-tomcat-7.0.37/webapps
Edit php.ini
sendmail_path = /usr/sbin/sendmail -t -i
Turn on the mail server your hostconfig file:
Run sudo nano -w /etc/hostconfig in Terminal. Look for the line starting MAILSERVER=, if you don’t see it, add it and make sure it reads:
MAILSERVER=-YES-
Edit /etc/postfix/main.cf and add the following to the end:
#wstars sphinx index files location
cd /var/intafeen/sphinx/
# remove all indexes
rm *
su searchd
# rerun index
/usr/local/bin/indexer --config /usr/local/etc/sphinx.conf venues_idx
ls -alh
@AhmedKammorah
AhmedKammorah / new_gist_file
Created August 29, 2013 09:52
make async task ios
dispatch_queue_t queue = dispatch_get_global_queue(
DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
//any thing
});
//ref
@AhmedKammorah
AhmedKammorah / KammorahMac.sh
Created September 14, 2013 18:10
install Mysql python on mac and XAMMP
// mysql-python location
/Users/ahmedkammorah/Desktop/Python WorkSpace/MySQL-python-1.2.4b4
sudo python setup.py build
sudo python setup.py install
@AhmedKammorah
AhmedKammorah / VirtualHost.sh
Created September 30, 2013 11:15
VirtualHost
<VirtualHost 178.79.128.80:443>
ServerName api.intafeen.com
DocumentRoot /var/www
SSLEngine on
SSLCACertificateFile /etc/ssl/RapidSSL_CA_bundle.pem
SSLCertificateFile /etc/ssl/certs/api.intafeen.com.cert
SSLCertificateKeyFile /etc/ssl/private/api.intafeen.com.key
<Proxy *>
md5 -s 'this will be encrypted'
MD5 ("this will be encrypted") = 502810f799de274ff7840a1549cd028a
md5 -qs 'this will be encrypted'
echo -n "this will be encrypted" | md5
@AhmedKammorah
AhmedKammorah / heapTomcat.sh
Last active December 26, 2015 05:49
change heap memory config forr tomccat
top
get pid
jmap -heap <pid>
add \usr\share\tomcat7\bin\setenv.sh
add
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"
>/etc/init.d/tomcat6 restart
@AhmedKammorah
AhmedKammorah / Postgresql.sh
Created October 24, 2013 10:49
Postgresql
>su postgres
>psql navinside # connect to postgresql with db navinside
\list # list all DB
SELECT * FROM information_schema.tables
WHERE table_schema = 'public';
select * From segments;