Skip to content

Instantly share code, notes, and snippets.

View RazaChohan's full-sized avatar

Muhammad Raza RazaChohan

View GitHub Profile
@RazaChohan
RazaChohan / my-travels.md
Created July 28, 2019 09:05 — forked from nouman91/my-travels.md
Useful libraries and solution I found

My travels

I have been working in JavaScript area for over five years, and in those years I have come across various different problems and implemented solutions for them. I have also studied JavaScript extensively and used many of open source libraries. My aim with this gist is to share my knowledge with you. In this gist I will be sharing many different useful resources which I have used and studied over the years.

Table of Contents

  • Design system
  • Front-end libraries
  • General purpose libraries
  • Back-end libraries
  • Unit test cases libraries
@RazaChohan
RazaChohan / .htaccess
Created January 20, 2017 14:04 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@RazaChohan
RazaChohan / xdebug_installation_on_linux.md
Created January 3, 2017 06:25 — forked from MAnfal/xdebug_installation_on_linux.md
Walkthrough for installing xdebug for php 7 on linux and enabling its support for phpstorm.

Xdebug Installation

Please follow the following steps to configure Xdebug on Linux.


Tested on

#C# Coding Standards

###Refactoring

Embrace refactoring! Make code refactorable by adding tests using TDD. Really TDD exists to allow refactoring.

The term code smell comes from Martin Fowler's book Refactoring. If you haven't already, read this book. The examples are in Java but they easily translate to C#. Don't write new code that has smells by refactoring them out. Here is a list of the most egregious smells:

  • Duplicated code.
  • Long Method.
@RazaChohan
RazaChohan / eloquent.md
Last active August 29, 2015 14:20 — forked from msurguy/eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@RazaChohan
RazaChohan / zsh.md
Last active February 21, 2019 09:41 — forked from tsabat/zsh.md
#!/usr/bin/env ruby
File.open("your_file.md", 'r') do |f|
f.each_line do |line|
forbidden_words = ['Table of contents', 'define', 'pragma']
next if !line.start_with?("#") || forbidden_words.any? { |w| line =~ /#{w}/ }
title = line.gsub("#", "").strip
href = title.gsub(" ", "-").downcase
puts " " * (line.count("#")-1) + "* [#{title}](\##{href})"