Skip to content

Instantly share code, notes, and snippets.

👨‍💻
💯

Ahmad Hassan ahmadhasankhan

👨‍💻
💯
Block or report user

Report or block ahmadhasankhan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ahmadhasankhan
ahmadhasankhan / wkhtmltopdf_installation_guide.md
Last active Apr 17, 2019
Install Wkhtmltopdf 0.12.5–1 on Ubuntu 18.4
View wkhtmltopdf_installation_guide.md
sudo apt-get --purge remove wkhtmltopdf
sudo apt autoremove
sudo apt update

Install Wkhtmltopdf 0.12.5–1

  • Download Wkhtmltopdf package for Debian 9 from repository,
@ahmadhasankhan
ahmadhasankhan / ImageMagick-6.7.7-10.md
Last active Apr 18, 2019
Install ImageMagick 6.7.7-10 on Unix using binary
View ImageMagick-6.7.7-10.md

Remove imagemagick

sudo apt-get --purge remove imagemagick
sudo apt autoremove

Install Required package:

sudo apt-get install build-essential 
sudo apt-get install checkinstall
@ahmadhasankhan
ahmadhasankhan / imagemagick.rb
Last active Apr 16, 2019
ImageMagick 6.7.7-10 Homebrew Formula.md
View imagemagick.rb
require 'formula'
class Imagemagick < Formula
homepage 'http://www.imagemagick.org'
url 'http://www.imagemagick.org/download/releases/ImageMagick-6.7.7-10.tar.xz'
sha256 '85b0f9afe122c52a821001976a4f54ae011bb3d94a87b97e3112e515185731ad'
head 'https://www.imagemagick.org/subversion/ImageMagick/trunk',
:using => UnsafeSubversionDownloadStrategy
@ahmadhasankhan
ahmadhasankhan / rails-server-setup.md
Last active Mar 28, 2019
Install and Setup Nginx+Puma+PostgresSQL on Ubuntu-18
View rails-server-setup.md

Install and Setup Nginx+Puma+PostgresSQL on Ubuntu-18

Create Deploy User:

  From the root user 
  $ adduser involvio
  $ adduser involvio sudo
  $ exit
@ahmadhasankhan
ahmadhasankhan / gitflow-breakdown.md
Created May 28, 2018 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View gitflow-breakdown.md

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

View ahmad_id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN3A4R4IpK9kVu9zf8Fh410FZJbTl8PZG6QgPi76jBINLoj3Vr1OAdfHEmopfIlaT4Ce4r3gk0SauTqkSwujCM9I+VzvejRBMOcUU9iW3tBVYpNfYeB856mHvB3DF3fVD6OtgufaKh6OkjPxfg7kU+xRWcana3X02631Z46/2ZY9gKqr4ao0WkLn+ylj9huKawJkwbvAzAb/ieG16ut0BwAmZUAF1tqtShfNY+1EbiJRWU7oP8h7YUM2p9x1zHw07NKhgf+HAZd8XAjbgup6qyegWhjeDWK/g3x4WyQMR2KNNA90iG2LiUHI/yiFcjWqDOrw9LJrXYqAYuSegN/NNJ ahmadhassan@ahmads-mbp
View 1_user.rb
class User < ApplicationRecord
has_many :posts
has_many :comments
# id :integer not null, primary key
# name :string(50) default("")
end
@ahmadhasankhan
ahmadhasankhan / multiple_ssh_setting.md
Created Nov 25, 2017 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@ahmadhasankhan
ahmadhasankhan / modifies_the_array.md
Last active Nov 19, 2017
Write a function which accepts an integer array and its size and modifies the array in the following manner.
View modifies_the_array.md
# 1) If the elements of index i and (i+1) are equal then, double the value at index i
# and replace the element at index (i+1) with 0.
# 
#     2) If the element at index i is 0, then ignore it.
# 
#     3) Any number (element in an array) must be modified only once.
# 
#     4) At the end, shift all the zeros (0s) to the right of the array and remaining
# nonzeros to the left of the array.
@ahmadhasankhan
ahmadhasankhan / MySql-5.5-installation guide.md
Last active Oct 11, 2019
Install MySQL 5.5.xx on Ubuntu
View MySql-5.5-installation guide.md

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
You can’t perform that action at this time.