Skip to content

Instantly share code, notes, and snippets.

View sohelamin's full-sized avatar
🎯
Focusing

Sohel Amin sohelamin

🎯
Focusing
View GitHub Profile
@sohelamin
sohelamin / illuminate_html.md
Last active August 29, 2015 14:22
Install illuminate/html package
composer require "illuminate/html":"5.0.*"

Open /config/app.php and update as follows:

'providers' => [
	...
@sohelamin
sohelamin / make-server.md
Last active August 29, 2015 14:23
Make HTTP Server

##Create Portable Server in a Second for Development Purpose

###Python:

python -m SimpleHTTPServer 8888

###Python 3+:

@sohelamin
sohelamin / app.js
Last active August 29, 2015 14:23
BackboneJS Collection Filtering
// Backbone Model
var TaskModel = Backbone.Model.extend({
defaults: {
task: '',
type: ''
}
});
// Backbone Collection
var TasksCollection = Backbone.Collection.extend({
@sohelamin
sohelamin / query-string.js
Created July 16, 2015 11:57
Query String Get in JavaScript
function getQueryStringValue (key) {
return unescape(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + escape(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
}
var utm_source = getQueryStringValue("utm_source");
@sohelamin
sohelamin / gist:985c52c853a4c673a62f
Created October 12, 2015 17:45
WP Upload Limit
Create php.ini in wp-admin folder
In the file put the following 3 lines:
upload_max_filesize = 2048M
post_max_size = 2048M
max_execution_time = 3000
Goto to your website as admin and check the upload new media page, it should now display Maximum upload file size: 2 GB.
@sohelamin
sohelamin / chimpylite-mailchimp.php
Created November 4, 2015 06:49
Mailchimp Wrapper
<?php
/**
* Chimpy Lite MailChimp API Wrapper Class
* Partly based on official MailChimp API Wrapper for PHP
*
* @class ChimpyLite_Mailchimp
* @package ChimpyLite
* @author RightPress
*/
@sohelamin
sohelamin / guide.md
Last active January 12, 2016 18:04
Useful tool installation guide

Open JDK 8 installation

sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
java -version
@sohelamin
sohelamin / laravel.php
Created November 8, 2015 11:19
Laravel & Wordpress Login Together
<?php
Route::get('/wordpress', function(){
require('..\wordpress\wp-load.php');
return loginUser(Auth::user()->username);
});
@sohelamin
sohelamin / Sublime Packages.md
Last active August 12, 2017 13:27
Sublime config
  • DocBlockr
  • AdvancedNewFile
  • SnippetMaker
  • PHP Companion
  • SublimeLinter
  • SublimeLinter-phpcs
  • PHP CS Fixer