Skip to content

Instantly share code, notes, and snippets.

View razzul's full-sized avatar
🏠
Working from home

Razzul razzul

🏠
Working from home
View GitHub Profile
@razzul
razzul / full-text-search.md
Created January 11, 2017 11:19
MySQL : Full text search

Col : comment
Searching string : 294
Exclude : 100

SELECT * FROM 
    `tbl_business_review` 
WHERE 
    MATCH(comment) 
 AGAINST('+294 -100' IN BOOLEAN MODE)
@razzul
razzul / redis-windows-config.md
Last active June 21, 2023 12:11
Redis : windows configuration

1. Download the redis-latest or redis-latest.zip native 64bit Windows port of redis

wget https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip

2. Extract redis64-latest.zip in any folder, e.g. in c:\redis

3. Run the redis-server.exe using the local configuration

cd c:\redis

redis-server.exe redis.windows.conf

@razzul
razzul / array-sort.md
Created January 20, 2017 08:33
JavaScript : Sort array ascending | descend

By default the sort method sorts elements alphabetically.
To sort numerically just add a new method which handles numeric sorts

	var points = [40, 100, 1, 5, 25, 10];
	points.sort();
	// [1, 10, 100, 25, 40, 5]
	points.sort(function(a, b){return a-b})
	// [1, 5, 10, 25, 40, 100]
	points.sort(function(a, b){return b-a})
@razzul
razzul / andriod-studio-open-failed-after-install.md
Created February 20, 2017 08:35
Android Studio unable to open after install

Open the folder bin under the directory where you installed your Android Studio.
Find the file idea.properties and open it with Notepad++, UltraEdit, or other edit tools.
Add disable.android.first.run=true as the final line and save the file.
Restart Android Studio.

Remove col from listing

STEP 1:

public function index()
{
	$this->listing_cols = array_diff($this->listing_cols, ['description']);
@razzul
razzul / curl.md
Created March 15, 2017 06:38
cURL error 60: SSL certificate problem
@razzul
razzul / submile.md
Last active February 15, 2019 07:45
Sublime config

Material Theme

SUBLIME TEXT : INSTALLING MATERIAL THEME

Easy installation

You can install this awesome theme through the Package Control.

  1. Press ⌘/Ctrl + ⇧ + P to open the command palette.
  2. Type Package Control: Install Package and press enter. Then search for Material Theme.
@razzul
razzul / heroku.md
Created April 5, 2017 09:51
Heroku Config

heroku
laravel new laravel-heroku
web: vendor/bin/heroku-php-apache2 public
git init
git add .
git commit -m "First commit"
heroku create
heroku config:add \
git push heroku master
heroku addons:add heroku-postgresql:hobby-dev

@razzul
razzul / LNMP.md
Last active April 11, 2017 07:00
Learn how to install & configure Nginx, MySQL and PHP on an Ubuntu server

Learn how to install & configure Nginx, MySQL and PHP on an Ubuntu server.

Command Rundown

Here are the commands used:

Install some basics:

sudo apt-get update
sudo apt-get install -y wget curl vim tmux htop software-properties-common
@razzul
razzul / DataTable.md
Created April 24, 2017 05:43
DataTable population

DataTable

#CSS

th.sorting:after {
	content: url('themes/default/images/arrow.gif');
}
th.sorting_asc:after {
	content: url('themes/default/images/arrow_up.gif');