Skip to content

Instantly share code, notes, and snippets.

View arabsalem's full-sized avatar

Arab Salem arabsalem

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@ifnull
ifnull / gist:3961743
Created October 26, 2012 21:44
CURL IP w/ specific host
# Bypass HOSTS file and DNS and send request directly to IP with specified host name.
# Example below sends request to localhost with the host name www.foobar.com.
curl -sL -w "%{http_code}\\n" -o /dev/null --insecure --resolve 'www.foobar.com:127.0.0.1' https://www.foobar.com/
@jpatters
jpatters / HeidiDecode.js
Last active March 20, 2024 14:29
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
@ifnull
ifnull / gist:4955258
Last active December 13, 2015 18:28
AWS: Quick and secure LAMP on Amazon Linux
######
###### http://www.altmake.com/2013/03/06/secure-lamp-setup-on-amazon-linux-ami/
######
# http://imperialwicket.com/aws-quick-and-secure-lamp-on-amazon-linux
sudo su -
yum -y update
@ifnull
ifnull / gist:5055099
Created February 28, 2013 08:10
List permission as numeric values
stat -c "%a %n" .
@ifnull
ifnull / gist:5055107
Created February 28, 2013 08:13
Set permissions for Apache
chown -R apache:www-data .
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
find . -type f -exec chmod u=rw,g=r,o= '{}' \;
@ifnull
ifnull / yum-security.cron
Created March 7, 2013 01:03
YUM cron for automatic security updates.
#!/bin/sh
yum -y -R 120 -d 0 -e 0 update yum
yum --security -y -R 10 -e 0 -d 0 update
@ifnull
ifnull / gist:6102790
Last active December 20, 2015 08:49
Get octal permissions
# Linux
stat -c "%a %n" ~/
# OSX
stat -f %Mp%Lp ~/
@sl-digital
sl-digital / Amazon-Linux-AMI PHP55
Last active May 24, 2021 11:03
Install Apache, MySQL and PHP 5.5 on Amazon Linux AMI
:: UPDATE YUM ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo yum update -y
:: INSTALL WEBSERVER :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo yum install httpd24
sudo service httpd start
sudo chkconfig httpd on
chkconfig --list httpd
@miglen
miglen / aws-certification.md
Last active May 5, 2023 10:04
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams


AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.