Skip to content

Instantly share code, notes, and snippets.

@delwar2016
delwar2016 / Python Regular expression
Created January 18, 2017 04:38
Python Regular expression
In Python "re" module is used to write regular expression.
What are various methods of Regular Expressions?
Most commonly used regular expressions are as follows:
1. re.match(pattern, string)
2. re.search(pattern, string)
3. re.findall(pattern, string)
4. re.split(pattern, string, [maxsplit=0])
5. re.sub(pattern, repl, string)
6. re.compile(pattern, repl, string)
@delwar2016
delwar2016 / composer install -problem fix
Created February 15, 2017 07:28
composer install -problem fix
problem:
Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
Problem 3
- Installation request for braintree/braintree_php 2.39.0 -> satisfiable by braintree/braintree_php[2.39.0].
- braintree/braintree_php 2.39.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
@delwar2016
delwar2016 / magento installation issue
Last active March 17, 2017 18:08
magento installation issue
localization issue
http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
installation php 5.6
http://stackoverflow.com/questions/40567133/cannot-add-ppa-ppaondrej-php5-5-6
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install -y php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip libapache2-mod-php5.6
@delwar2016
delwar2016 / kick-start - django
Last active March 7, 2017 06:12
kick-start - django
Installtion
pip install django
Create Project
django-admin startproject home
Run server
@delwar2016
delwar2016 / FTP instalation
Last active April 6, 2017 11:38
FTP instalation
Source: https://www.liquidweb.com/kb/how-to-install-and-configure-vsftpd-on-ubuntu-14-04-lts/
https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
@delwar2016
delwar2016 / Install RTMP
Last active April 20, 2017 01:33
Install RTMP
Link: https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/
apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
wget http://nginx.org/download/nginx-1.9.15.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
@delwar2016
delwar2016 / git add new repo
Created April 28, 2017 06:41
git add new repo
https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
@delwar2016
delwar2016 / Understanding NodeJs Express Middleware
Last active June 8, 2017 17:48
Understanding NodeJs Express Middleware
Middleware functions can perform the following tasks:
1. Execute any code.
2. Make changes to the request and the response objects.
3. End the request-response cycle.
4. Call the next middleware function in the stack.
@delwar2016
delwar2016 / Installation .Net Code onUbuntu 14.04
Last active June 21, 2017 19:58
Installation .Net Code onUbuntu 14.04
https://www.microsoft.com/net/core#linuxubuntu
https://stackoverflow.com/questions/37460631/asp-net-core-test-site-cant-be-reached
The Kestrel web server defaults to listening on localhost:5000, so if you haven't changed what host it listens on you won't be able to connect to it from a remote machine (or in your case, the host machine).
There are several ways that you can configure Kestrel to listen on a different host or port. The simplest implementation would be to add the line .UseUrls("http://0.0.0.0:5000") right after .UseKestrel() in your Main method. This would make the application listen on all available IP addresses using port 5000.
Update
@delwar2016
delwar2016 / generator-backbone-fullstack
Last active July 13, 2017 16:01
generator-backbone-fullstack
npm -g install yo
npm -g install generator-backbone
https://books.google.com.bd/books?id=5NPGAwAAQBAJ&pg=PA143&lpg=PA143&dq=generator-backbone-fullstack&source=bl&ots=txake5LXcg&sig=S_2RU2sUcHy5ePYV7dG4BSS8u_Q&hl=en&sa=X&redir_esc=y#v=onepage&q&f=false
https://github.com/yeoman/generator-backbone#readme
https://github.com/pusongyang/generator-fullstack-backbone