Skip to content

Instantly share code, notes, and snippets.

@AhmedKammorah
AhmedKammorah / docker_stop_remove_containers.sh
Created November 14, 2015 23:44
Docker stop and remove all containers
# Docker stop and remove all containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@AhmedKammorah
AhmedKammorah / BasicNodeDockerfile
Created October 29, 2015 23:43
Socker file for Basic Node js image
# inheret from ubuntu
FROM ubuntu:14.04
# author
MAINTAINER Ahmed Kammorah
RUN apt-get update
RUN apt-get install curl -y
# Setup with Ubuntu:
Document
@AhmedKammorah
AhmedKammorah / new_gist_file_0
Created December 13, 2013 23:44
humail error run arc
//normal
VALID_ARCHS = arm64 armv7 armv6 armv7s
//for ios 7 , ios 5
//:configuration = Debug
VALID_ARCHS = arm64 armv7 armv6
//:configuration = Release
VALID_ARCHS = arm64 armv7 armv6
//:completeSettings = some
:<line number> # go to li
dd # delete line
shift+gg # to the end of file
@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;
@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
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 / 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 *>
@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