Skip to content

Instantly share code, notes, and snippets.

View imanilchaudhari's full-sized avatar
💻
Learning Dart On Flutter

Anil Chaudhari imanilchaudhari

💻
Learning Dart On Flutter
View GitHub Profile
1. Get refresh token
https://github.com/googleads/googleads-php-lib/wiki/API-access-using-own-credentials-(installed-application-flow)
@imanilchaudhari
imanilchaudhari / countries-with-two-words.txt
Created October 17, 2017 09:06
Countries with two words
Burkina Faso
Cape Verde
Costa Rica
Cote d'Ivoire
Czech Republic
Dominican Republic
East Timor
El Salvador
Equatorial Guinea
Guinea Bissau
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev
@imanilchaudhari
imanilchaudhari / SchemaBreadcrumbs.php
Created August 22, 2017 06:41
Schema breadcrumb for yii2
<?php
namespace frontend\widgets;
use Yii;
use yii\base\Widget;
use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Url;
@imanilchaudhari
imanilchaudhari / apache.conf
Created August 11, 2017 09:30
yii2-advanced-one-domain-config
<VirtualHost *:80>
ServerName advanced.local
#ErrorLog /dev/null
#LogLevel emerg
#CustomLog /dev/null combined
RewriteEngine on
# the main rewrite rule for the frontend application
RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
RewriteRule !^/frontend/web /frontend/web%{REQUEST_URI} [L]
@imanilchaudhari
imanilchaudhari / view.php
Created July 20, 2017 11:29
Disable auto reload page on Yii2+Pjax
$this->registerJs('$(document).on("pjax:timeout", function(event) {
// Prevent default timeout redirection behavior
event.preventDefault()
});');
@imanilchaudhari
imanilchaudhari / Install Redis on Ubuntu.md
Created June 21, 2017 16:52
How to Install, Configure and Use Redis on Ubuntu 16.04

Redis is an in-memory data structure store primarily used as a database and cache. In this tutorial, we are going to show you how to install, configure and use Redis on a Linux VPS running Ubuntu 16.04 as an operating system.

Connect to your Linux server via SSH, resynchronize the package index files from their sources and install the newest versions of all packages that are currently installed on your server by using the following commands:

sudo apt-get update sudo apt-get upgrade Once the upgrade is completed you can move on to the next step.

Install Redis on Ubuntu 16.04 Installing Redis on an Ubuntu VPS is simple. Run the command below to install Redis on your machine:

@imanilchaudhari
imanilchaudhari / Install Sphinx On Ubuntu.md
Last active June 21, 2017 16:36
How To Install Sphinx On Ubuntu

First of all, this is my first post and I apologize for the bad English. Sphinx is a full-text search engine, publicly distributed under GPL version 2. Commercial licensing (eg. for embedded use) is available upon request. You can use Sphinx for creating big data indexes. It supports MySQL, PostgreSQL, ODBC. If you use Ubuntu 10.10, you can use sudo apt-get install sphinxsearch

to install Sphinx. Sphinx uses a configuration file (/etc/sphinxsearch/sphinx.conf). You should adjust this file to your configuration. vi /etc/sphinxsearch/sphinx.conf

The conf file consists out of four parts:

@imanilchaudhari
imanilchaudhari / Crawler.php
Created May 8, 2017 08:55
Webpage crawler using php
<?php
class Crawler
{
protected $_url;
protected $_depth;
protected $_host;
protected $_useHttpAuth = false;
protected $_user;
protected $_pass;
protected $_seen = array();
@imanilchaudhari
imanilchaudhari / nginx.conf
Created March 25, 2017 12:20
Yii2 advanced domain configuration on virtual host
# source https://github.com/mickgeek/yii2-advanced-one-domain-config
<VirtualHost *:80>
ServerName advanced.local
#ErrorLog /dev/null
#LogLevel emerg
#CustomLog /dev/null combined
RewriteEngine on
# the main rewrite rule for the frontend application
RewriteCond %{REQUEST_URI} !^/(backend/web|admin)